flatbuffers

Function emplace_scalar

Source
pub unsafe fn emplace_scalar<T: EndianScalar>(s: &mut [u8], x: T)
Expand description

Place an EndianScalar into the provided mutable byte slice. Performs endian conversion, if necessary.

ยงSafety

Caller must ensure s.len() >= size_of::<T>()