Trait byte_slice_cast::FromByteSlice
source · 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.