Trait bin_utils::ReadFixed

source ·
pub trait ReadFixed<const N: usize>where
    Self: Sized,{
    // Required method
    fn from_bytes(data: &[u8; N]) -> Result<Self, ParserError>;
}
Expand description

A trait for reading data of fixed length.

Required Methods§

source

fn from_bytes(data: &[u8; N]) -> Result<Self, ParserError>

Implementations on Foreign Types§

source§

impl<const N: usize, T> ReadFixed<{ T::SIZE * N }> for [T; N]where T: StaticallySized + ReadFixed<{ T::SIZE }> + Default + Copy,

source§

fn from_bytes(data: &[u8; { _ }]) -> Result<Self, ParserError>

Implementors§