Function mz_repr::read_datum
source · pub unsafe fn read_datum<'a>(data: &'a [u8], offset: &mut usize) -> Datum<'a>
Expand description
Read a datum starting at byte offset
.
Updates offset
to point to the first byte after the end of the read region.
§Safety
This function is safe if a Datum
was previously written at this offset by push_datum
.
Otherwise it could return invalid values, which is Undefined Behavior.