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

Trait for different formats of bitmap deserialization

Required Methods§

source

fn try_deserialize(buffer: &[u8]) -> Option<Bitmap>

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

If the buffer starts with the serialized representation of a bitmap, then this method will return a new bitmap containing the deserialized data.

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

To determine how many bytes were consumed from the buffer, use the Serializer::get_serialized_size_in_bytes method on the returned bitmap.

Implementors§