Skip to main content

quillmark_core/document/
limits.rs

1//! Size and depth budget constants for document parsing.
2//!
3//! These constants govern the maximum sizes and counts accepted during parsing
4//! to prevent denial-of-service via excessively large or deeply nested input.
5
6/// Maximum YAML nesting depth (100 levels).
7///
8/// Prevents stack overflow from deeply nested YAML structures.
9/// Enforced at the serde-saphyr parser level via [`serde_saphyr::Budget`].
10pub const MAX_YAML_DEPTH: usize = 100;