flatbuffers

Function read_scalar

Source
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>().