pub unsafe trait FromByteSlicewhere
Self: Sized,{
// Required methods
fn from_byte_slice<T: AsRef<[u8]> + ?Sized>(
slice: &T,
) -> Result<&[Self], Error>;
fn from_mut_byte_slice<T: AsMut<[u8]> + ?Sized>(
slice: &mut T,
) -> Result<&mut [Self], Error>;
}
Expand description
Trait for converting from a byte slice to a slice of a fundamental, built-in numeric type.
This trait is an implementation detail. Use the AsSliceOf
and AsMutSliceOf
traits.
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.