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. By keeping track of the module and BindingKey pair that identifies the specific resolution.

Functionsยง

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