Skip to main content

Module message

Module message 

Source
Expand description

Zero-copy message access. Message::parse only reads the 24-byte header; nothing else is touched until a field is asked for, and every field read is a bounds-checked load straight out of the buffer through a precompiled Resolver plan. Strings and byte fields are returned as &str / &[u8] borrowing the message buffer — no allocation, no copy.

Structs§

Budget
A per-read traversal budget — an opt-in guard against amplification-DoS on untrusted messages (the wire spec §5.2). Veritate’s offsets are absolute and may alias, so a small hostile message can point many fields at the same large sub-object and make a naive full read do work super-linear in the message’s own size. Memory safety (bounds, depth, allocation) always holds; a Budget additionally caps total work.
ListReader
MapReader
A map<K, V> read lazily from the buffer. Entries are stored sorted by key (canonical order), so get yields them in that order.
Message
StructReader
UnionReader
A union<…> value read lazily: a variant tag and the selected variant’s value.

Enums§

Ref
A field value read from the buffer. Scalars are by value; strings, bytes, structs, and lists borrow the message buffer ('b).