Skip to main content

Module util

Module util 

Source
Expand description

§Utilities: shared parsing helpers for on-disk structures

Little-endian reader functions for extracting typed values from raw byte buffers at known offsets. Used throughout the disk crate to parse packed on-disk structures safely without pointer casts.

Functions§

read_le_u16
Read a little-endian u16 from buf at byte offset off.
read_le_u32
Read a little-endian u32 from buf at byte offset off.
read_le_u64
Read a little-endian u64 from buf at byte offset off.
read_uuid
Read a UUID (16 bytes, big-endian byte order) from buf at byte offset off.
write_le_u16
Write a little-endian u16 into buf at byte offset off.
write_le_u32
Write a little-endian u32 into buf at byte offset off.
write_le_u64
Write a little-endian u64 into buf at byte offset off.
write_uuid
Write a UUID (16 bytes) into buf at byte offset off.