Skip to main content

scope

Function scope 

Source
pub fn scope<R>(interrupt: &Interrupt, f: impl FnOnce() -> R) -> R
Expand description

Run f with interrupt active on this thread, then restore whatever was active before (also on panic). An inert interrupt still opens a scope, which shields f from an outer interrupt; use scope_if to keep the outer one.