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§
- Bytes
Ref - Null
- A unit type representing the null value in Relish serialization.
- Parse
Error - Error type returned when parsing Relish binary data fails.
- Write
Error - Error type returned when serializing to Relish binary format fails.
Enums§
- Parse
Error Kind - Specific kinds of parsing errors that can occur when deserializing Relish data.
- TypeId
- Type identifiers used in the Relish binary format.
- Write
Error Kind - Specific kinds of writing errors that can occur when serializing Relish data.
Traits§
- Field
Value - 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§
- Parse
Result - Result type for parsing operations.
- Write
Result - Result type for writing operations.
Derive Macros§
- Relish
- Re-export of the derive macro for implementing the Relish trait on custom types.