Trait desert::CountBytesLE
source · [−]pub trait CountBytesLE {
fn count_from_bytes_le(buf: &[u8]) -> Result<usize, Error>;
fn count_bytes_le(&self) -> usize;
fn count_from_bytes_le_more(buf: &[u8]) -> Result<Option<usize>, Error> { ... }
}
Expand description
Count how many bytes to read from a byte slice for a type and calculate how many bytes the serialization would contain. In little endian.
Required methods
Return how many bytes from buf
would be required to deserialize Self
in little endian.
fn count_bytes_le(&self) -> usize
fn count_bytes_le(&self) -> usize
Return the number of bytes that the serialization would require.