Skip to main content

Module decode

Module decode 

Source
Expand description

Bounded ownership and decompression limits for untrusted decode input.

DecodeArena owns stable buffers, DecodeContext owns session state, and View provides bounded navigation within one address space.

Modules§

collect
Collections whose length is proven against the input.
tree
XML and JSON parsing with nesting depth charged to the decode session.
zstd
Window-admitted Zstandard streams.

Structs§

BoundedCount
A count proven to fit in the unread input.
BudgetExhausted
A work budget reached its limit.
ByteRange
A half-open byte range [start, end) within one space.
Companion
A file that a Companions source opened.
DecodeArena
Owns stable byte buffers allocated during a decode.
DecodeCheckpoint
Immutable resource state from which independent decode tasks can start.
DecodeContext
Shared monotonic decode state.
DecodePolicy
Decode mode and resource ceilings.
DecodeSpaceRebinding
Rebinds a task’s derived address spaces at its composition position.
DecodeTrace
Charge totals between ordered budget observations and expansion boundaries. A refused group causes the caller to execute the original operations.
DepthGuard
A guard holding one unit of recursive nesting depth.
ExpandWriter
Writes decompressed output under incremental charging.
InspectOptions
Resource options for container inspection.
ParseError
A classified failure after commitment, with its location.
ResourceLimit
A resource refusal.
ResourceLimits
Absolute resource ceilings.
SourceLocation
An offset qualified by its address space.
SpaceId
Names one address space within a single decode.
View
A bounded window over one address space.
WholeInput
A detection prefix that holds every byte of its source.
WorkBudget
A local work counter for one bounded search or iteration.
WorkBudgetRecursionGuard
RAII guard for one recursive frame of a WorkBudget.

Enums§

CompanionLoad
The result of a companion request.
DecodeDepth
How much of the source document a decode transfers.
DecodeMode
Whether a successful decode may report mandatory transfer losses.
ExpandSpec
How much output an expansion is expected to produce.
ParseErrorKind
The classified reason a committed parse failed.
ResourceDimension
Which resource a limit governs.
ResourceFailure
Why a resource request failed.

Traits§

Companions
A source of the files that a decoded input names by path.

Functions§

bounded_len
Converts a declared element count into a safe Vec capacity.
id_from_index
Narrows the position of one item already held in memory to the u32 an IR identifier, order or index field is stated in.
index_from_u32
Widens a 32-bit count, identifier or index to a usize index.
index_from_u64
Narrows an offset stated in a wire u64 to an index into bytes held in memory.
u64_from_index
Widens an in-memory length, index or capacity to a u64.
unique_index
Indexes entries by key, mapping a key that occurs more than once to None.
work_units
The work a step over items owes a WorkBudget.