Skip to main content

value_nesting_within_limit

Function value_nesting_within_limit 

Source
pub fn value_nesting_within_limit(value: &Value, max_depth: usize) -> bool
Expand description

Returns whether every array/object in value is at most max_depth deep.

The walk is iterative, so checking an untrusted handler result cannot itself overflow the thread stack. Scalar roots have depth zero. See crates/khive-request/docs/api/limits-and-errors.md for usage with $prev.