pub unsafe fn read_scalar<T: EndianScalar>(s: &[u8]) -> T
Expand description
Read an EndianScalar from the provided byte slice. Performs endian conversion, if necessary.
ยงSafety
Caller must ensure s.len() > size_of::<T>()
.
pub unsafe fn read_scalar<T: EndianScalar>(s: &[u8]) -> T
Read an EndianScalar from the provided byte slice. Performs endian conversion, if necessary.
Caller must ensure s.len() > size_of::<T>()
.