Expand description
Storage encoding (MessagePack serialize/deserialize, KeyEncoder trait). Storage encoding — serialize/deserialize values for storage.
Provides encode() and decode() using MessagePack for compact binary
serialization, and the KeyEncoder trait for ordered-binary key encoding.
§Errors
encode / decode and the KeyEncoder methods return
Result<T, YetiError> with Encoding(EncodingError::MessagePack) on
failure. Causes:
- serialization: a
Serializeimpl returning an error, or a value shape unrepresentable inMessagePack. - deserialization: bytes not valid
MessagePack, or the wire shape does not matchT: DeserializeOwned.
Traits§
- KeyEncoder
- Trait for ordered-binary key encoding.
Functions§
- decode
- Deserialize bytes from storage to a value (
MessagePackformat). - encode
- Serialize a value to bytes for storage (
MessagePackformat). - try_
decode - Try to deserialize bytes, returning None on failure.