pub trait Deserializer {
    // Required method
    fn try_deserialize(buffer: &[u8]) -> Option<(Treemap, usize)>;
}
Expand description

Trait for different formats of treemap deserialization

Required Methods§

source

fn try_deserialize(buffer: &[u8]) -> Option<(Treemap, usize)>

Try to deserialize a treemap from the beginning of the provided buffer

If the buffer starts with the serialized representation of a treemap, then this method will return a tuple containing a new treemap containing the deserialized data, and the number of bytes consumed from the buffer.

If the buffer does not start with a serialized treemap (or contains an invalidly truncated treemap), then this method will return None.

Implementors§