Skip to main content

read_toml_with

Function read_toml_with 

Source
pub fn read_toml_with(text: &str, limits: &Limits) -> Result<Doc, OmnistError>
Expand description

read_toml under explicit Limits.

Returns the Limits::validate error unchanged when the limits are out of range. A limit crossed is a crate::error::DocumentError (document.limit.depth / document.limit.nodes at $, document.limit.int-digits at the path of the over-long integer), never a ParseError.

TOML text is parsed by toml_edit, which enforces a recursion cap of its own (about 80 levels of inline-table nesting) and holds every integer in 64 bits, so a max_depth above that cap, or a max_int_digits above 19, does not make this reader accept anything toml_edit refuses.