Skip to main content

enter_atomisation_pass

Function enter_atomisation_pass 

Source
pub fn enter_atomisation_pass() -> (u32, AtomisationDepthGuard)
Expand description

Enter an atomisation-pass scope. Returns the new depth (post-increment) plus an RAII guard that restores the depth on drop. Callers MUST retain the guard across the full atomise body — dropping it mid-call would underflow the depth and let nested calls escape the cap.

The caller is expected to compare the returned depth against MAX_ATOMISATION_DEPTH and refuse with AtomiseError::DepthExceeded when over-cap.