pub trait FromSlice {
// Required method
fn new_from_slice(data: &mut [u8]) -> &mut Self;
}Expand description
This is a convenience trait that exposes an interface to read a struct from an arbitrary byte array
Required Methods§
fn new_from_slice(data: &mut [u8]) -> &mut Self
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.