pub trait DeserializeMinBEInt: Sized {
    // Required method
    fn from_be_bytes_min(
        buffer: &[u8],
        max_value: Self
    ) -> Result<(Self, usize), ModelsError>;
}
Expand description

Deserialize min big endian

Required Methods§

source

fn from_be_bytes_min( buffer: &[u8], max_value: Self ) -> Result<(Self, usize), ModelsError>

Deserializes a minimally sized big endian integer to Self from the provided buffer and checks that its value is within given bounds. In case of success, return the deserialized data and the number of bytes read

Implementations on Foreign Types§

source§

impl DeserializeMinBEInt for u64

source§

fn from_be_bytes_min( buffer: &[u8], max_value: Self ) -> Result<(Self, usize), ModelsError>

source§

impl DeserializeMinBEInt for u32

source§

fn from_be_bytes_min( buffer: &[u8], max_value: Self ) -> Result<(Self, usize), ModelsError>

Implementors§