Skip to main content

MAX_FILTER_DEPTH

Constant MAX_FILTER_DEPTH 

Source
pub const MAX_FILTER_DEPTH: usize = 32;
Expand description

Maximum FilterOperator nesting a method call’s filter argument may have when it passes through crate::Dispatcher::dispatch.

Every filter walker in the workspace (Filter::matches, the *-server validators and reference backends) recurses once per conditions array, so this cap bounds their stack use without each carrying its own (bd:JMAP-xmvz). It matches the ~32-level JSON-depth contract on parse_request and MAX_JSON_POINTER_DEPTH.