Skip to main content

with_value_decode_depth_limit

Function with_value_decode_depth_limit 

Source
pub fn with_value_decode_depth_limit<T>(
    max_depth: Option<usize>,
    decode: impl FnOnce() -> T,
) -> T
Expand description

Runs decode with the requested container-depth limit for Value decoding on this thread.

This is used by version-aware protocol decoders so historical versions can retain their original behavior while current versions reject excessive nesting before constructing a recursive value tree.