Skip to main content

MAX_NODES

Constant MAX_NODES 

Source
pub const MAX_NODES: usize = 1_000_000;
Expand description

Maximum total node count for a single Document (matches the reference default in omnist-spec docs/02-document-model.md Sec2.4: a depth limit alone doesn’t bound a shallow-but-enormous document, e.g. a million sibling edges at depth 1). Enforced once, in push, the single arena choke point every construction path (build_node, push_raw) funnels through – see omnist-rs#78: previously the only node-count guard in this crate was scoped narrowly to formats::yaml’s anchor/alias amplification defense, leaving every other construction path unbounded.