Skip to main content

RecursionGuard

No overview available.

Attributes

AttributeTypeDescription
state[ContainsRecursionState](containsrecursionstate.md?sid=recursion_guard_containsrecursionstate)Mutable reference to the recursion state container used to track visited objects and nodes during traversal.
obj_idusizeUnique memory address or identifier of the object currently being processed to detect circular references.
node_idusizeIdentifier for the specific structural node within the object to prevent infinite recursion at the same depth.

Constructor

Signature

def RecursionGuard(
state: &'a mut S,
obj_id: usize,
node_id: usize
)

Parameters

NameTypeDescription
state&'a mut SA mutable reference to the recursion state container.
obj_idusizeThe unique identifier of the object being processed.
node_idusizeThe unique identifier of the current node in the recursion tree.

Signature

@staticmethod
def new(
state: &'a mut S,
obj_id: usize,
node_id: usize
) - > [RecursionGuard](recursionguard.md?sid=recursion_guard_recursionguard)

Parameters

NameTypeDescription
state&'a mut SThe mutable recursion state container used to track visited objects
obj_idusizeThe unique memory address or identifier of the object being processed
node_idusizeThe identifier for the specific schema node or validation step being executed