pub trait FromByteSlice {
    fn from_le_bytes(bytes: &[u8]) -> Self;
    fn bytes_expected() -> usize;
}
Expand description

A trait to deserialize the implemeting type from a byte slice.

Required Methods

Deserialize the implementing type from a byte slice.

Returns how many bytes are expected to deserialize a instance of the implementing type. Currently this method is only used for strings.

Implementations on Foreign Types

Implementors