Skip to main content

Module cycle_detection

Module cycle_detection 

Source

StructsΒ§

ActiveResolutionGuard πŸ”’

ConstantsΒ§

ACTIVE_RESOLUTIONS πŸ”’
During import resolution, recursive imports can form cycles. This set stores the active resolution stack for the current thread. So it’s essentially a recursion stack.

FunctionsΒ§

enter_cycle_detector πŸ”’
Returns Err(()) if a cycle is detected, otherwise this returns a guard that will remove the resolution when dropped.