Skip to main content

DecodeBounded

Derive Macro DecodeBounded 

Source
#[derive(DecodeBounded)]
Expand description

Derives rustbinary::DecodeBounded, the schema-derived resource cost algebra (B, A, D, W) = (max input bytes, max allocation, max nesting depth, max work) that mirrors the parser structure.

Fields must implement rustbinary::DecodeBounded. Named fields contribute their object-key bytes, containers contribute a nesting level, and dynamic collections/strings report usize::MAX for content-dependent resources. Unions are rejected.