pub trait FromData: Sized {
const SIZE: usize;
// Required method
fn parse(data: &[u8]) -> Option<Self>;
}
Expand description
A trait for parsing raw binary data of fixed size.
This is a low-level, internal trait that should not be used directly.
Required Associated Constants§
Required Methods§
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.