Skip to main content

Module field

Module field 

Source
Expand description

Field extraction from raw MessagePack maps.

Given a &[u8] containing a MessagePack map, extract the byte range of a value for a given key — without allocating or decoding.

Functions§

extract_dot_path
Extract a value using a dot-separated path string (e.g., "address.city"). Convenience wrapper over extract_path.
extract_field
Locate the value for field in a MessagePack map starting at offset. Returns the byte range (value_start, value_end) of the matched value.
extract_path
Extract a value at a nested path (e.g., ["address", "city"]). Each segment must be a string key in a nested map.

Type Aliases§

FieldRange
A byte range (start, end) within a MessagePack buffer, pointing to a complete value (tag + payload). Use read_f64, read_i64, read_str etc. with range.0 as the offset to decode the value.