pub trait DepthCounter: Debug + Copy {
// Required methods
fn zero() -> Self;
fn increment(self) -> (Self, bool);
fn decrement(self) -> (Self, bool);
fn is_zero(self) -> bool;
}Expand description
Trait for depth counters - tracks nesting depth.
This trait provides overflow-safe operations for tracking JSON nesting depth. Implemented for all unsigned integer types.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".