Trait croaring::treemap::Deserializer
source · pub trait Deserializer {
// Required method
fn try_deserialize(buffer: &[u8]) -> Option<(Treemap, usize)>;
}
Expand description
Trait for different formats of treemap deserialization
Required Methods§
sourcefn try_deserialize(buffer: &[u8]) -> Option<(Treemap, usize)>
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
.
Object Safety§
This trait is not object safe.