Expand description
Decode time record limits, shared by every PowerIO wire.
The stored .pio.json record wire and the core record wire must refuse the
same hostile inputs: every sequence, map, and string is bounded while it is
decoded, before the full collection has been retained. The helpers here run
inside serde visitors (#[serde(deserialize_with = ...)]), so the only
transient allocation is the JSON scanner’s own token buffer.
Structs§
- Bounded
Str - A string field that is refused past
max_bytes, checked before the text is retained. - Truncated
Str - A string field that is truncated at a character boundary once
max_byteshave been retained. Used for message text whose semantic limit is already a truncation rule rather than a refusal.
Constants§
- MAX_
DIAGNOSTIC_ CODE_ BYTES - MAX_
DIAGNOSTIC_ DETAIL_ KEYS - MAX_
DIAGNOSTIC_ MESSAGE_ BYTES - MAX_
DIAGNOSTIC_ MESSAGE_ DECODE_ BYTES - Raw bytes retained for one message while decoding, before sanitization. Every writer sanitizes at construction, so a stored message near this bound was not produced by PowerIO; past it the raw text is truncated, and the result is still sanitized to one bounded line.
- MAX_
DIAGNOSTIC_ RELATED - MAX_
DIAGNOSTIC_ SPANS - MAX_
DIAGNOSTIC_ TARGET_ BYTES - MAX_
HISTORY_ NOTES - MAX_
HISTORY_ PARAMETERS - MAX_
IDENTIFIER_ BYTES - MAX_
MODULE_ DIAGNOSTICS - MAX_
MODULE_ EXTENSION_ KEYS - MAX_
MODULE_ HISTORY_ ENTRIES - MAX_
MODULE_ SOURCES - Module level record counts. Each stored module list is refused at its count while it is decoded, so a small hostile document cannot declare its way into an unbounded record allocation.
- MAX_
MODULE_ SOURCE_ MAP_ ENTRIES - MAX_
SOURCE_ MAP_ SPANS