Crate relish

Crate relish 

Source
Expand description

Relish is a binary serialization format library designed for efficient encoding, explicit backwards compatibility through field tagging, and flexible type serialization.

The format uses Type-Length-Value (TLV) encoding with support for both fixed-size and variable-size types. See the SPEC.md file for the complete format specification.

§Examples

use relish::{Relish, parse, to_vec};
use bytes::Bytes;

// Serialize a value to bytes
let value = 42u32;
let bytes = to_vec(&value).unwrap();

// Deserialize bytes back to a value
let parsed: u32 = parse(Bytes::from(bytes)).unwrap();
assert_eq!(parsed, 42);

Structs§

BytesRef
Null
A unit type representing the null value in Relish serialization.
ParseError
Error type returned when parsing Relish binary data fails.
WriteError
Error type returned when serializing to Relish binary format fails.

Enums§

ParseErrorKind
Specific kinds of parsing errors that can occur when deserializing Relish data.
TypeId
Type identifiers used in the Relish binary format.
WriteErrorKind
Specific kinds of writing errors that can occur when serializing Relish data.

Traits§

FieldValue
Relish
Core trait for types that can be serialized and deserialized in the Relish format.

Functions§

parse
Parse a value from Relish binary format.
to_vec
Serialize a value to Relish binary format as a Vec.

Type Aliases§

ParseResult
Result type for parsing operations.
WriteResult
Result type for writing operations.

Derive Macros§

Relish
Re-export of the derive macro for implementing the Relish trait on custom types.