Trait 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>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

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§