Expand description
Low-level MessagePack binary reader: tag parsing, value skipping, and typed reads.
All functions operate on &[u8] with explicit offsets. Zero allocation,
zero copy. Returns None on truncated/invalid data — never panics.
Functions§
- array_
header - Return the number of elements and the offset of the first element,
for the array starting at
offset. ReturnsNoneif not an array. - map_
header - Return the number of key-value pairs and the offset of the first pair,
for the map starting at
offset. ReturnsNoneif not a map. - read_
bool - Read a boolean from the value at
offset. - read_
f64 - Read an f64 from the value at
offset. Handles float32, float64, and all integer types (coerced to f64). - read_
i64 - Read an i64 from the value at
offset. Handles all integer types. Floats returnNone— useread_f64for those. - read_
null - Check if the value at
offsetis nil. - read_
str - Read a string slice from the value at
offset. Zero-copy — borrows directly from the input buffer. ReturnsNonefor non-string types or invalid UTF-8. - read_
value - Read a scalar msgpack value at
offsetintonodedb_types::Value. - skip_
value - Advance past the MessagePack value starting at
offset, returning the offset of the next value. ReturnsNoneif the buffer is truncated or nesting exceedsMAX_DEPTH.