Skip to main content

defer

Function defer 

Source
pub fn defer<F: FnOnce()>(action: F) -> Deferred<F>
Expand description

Schedules an action to be executed when the returned guard is dropped.

If the returned guard is dropped, the closure action will be executed. Call Deferred::cancel on the returned guard to prevent execution.