#[non_exhaustive]pub enum BudgetBreach {
Show 17 variants
Events {
events: usize,
},
Aliases {
aliases: usize,
},
Anchors {
anchors: usize,
},
Depth {
depth: usize,
},
InclusionDepth {
depth: u32,
},
Documents {
documents: usize,
},
Nodes {
nodes: usize,
},
ScalarBytes {
total_scalar_bytes: usize,
},
CommentBytes {
total_comment_bytes: usize,
},
MergeKeys {
merge_keys: usize,
},
AliasAnchorRatio {
aliases: usize,
anchors: usize,
},
SequenceUnbalanced,
InputBytes {
input_bytes: usize,
},
RecordedAnchorEvents {
recorded_anchor_events: usize,
},
RecordedAnchorBytes {
recorded_anchor_bytes: usize,
},
PropertyExpansionDepth {
depth: usize,
max_depth: usize,
},
PropertyInterpolationWork {
work: usize,
max_work: usize,
},
}Expand description
What tripped the budget (if anything).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Events
The total number of parser events exceeded Budget::max_events.
Aliases
The number of alias events (*ref) exceeded Budget::max_aliases.
Anchors
The number of distinct anchors defined exceeded Budget::max_anchors.
Depth
The structural nesting depth exceeded Budget::max_depth.
Depth counts nested SequenceStart and MappingStart events.
InclusionDepth
The include nesting depth exceeded Budget::max_inclusion_depth.
Documents
The number of YAML documents exceeded Budget::max_documents.
Nodes
The number of nodes exceeded Budget::max_nodes.
Nodes are SequenceStart, MappingStart, and Scalar events.
ScalarBytes
The cumulative size of scalar contents exceeded Budget::max_total_scalar_bytes.
CommentBytes
The cumulative size of comment contents exceeded Budget::max_total_comment_bytes.
MergeKeys
The number of merge keys (<<) exceeded Budget::max_merge_keys.
AliasAnchorRatio
The ratio of aliases to defined anchors is excessive.
Triggered when Budget::enforce_alias_anchor_ratio is true and
aliases > alias_anchor_ratio_multiplier × anchors (after scanning),
once aliases >= alias_anchor_min_aliases to avoid tiny-input
false positives.
Fields
SequenceUnbalanced
Unbalanced structure: a closing event was encountered without a matching opening event (depth underflow). Indicates malformed or truncated input.
InputBytes
The total number of input bytes exceeded Budget::max_reader_input_bytes.
RecordedAnchorEvents
Retained anchor event copies exceeded Budget::max_recorded_anchor_events.
RecordedAnchorBytes
Owned payload copied into retained anchor events exceeded
Budget::max_recorded_anchor_bytes.
Fields
PropertyExpansionDepth
Property operator text exceeded Budget::max_property_expansion_depth.
Fields
PropertyInterpolationWork
Property interpolation exceeded
Budget::max_total_property_interpolation_work.
Trait Implementations§
Source§impl Clone for BudgetBreach
impl Clone for BudgetBreach
Source§fn clone(&self) -> BudgetBreach
fn clone(&self) -> BudgetBreach
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more