#scope #guard #defer

scoped

Run deferred closures at success, failure, or exit of a scope. Also supports cancelling them

3 releases

0.1.2 Jan 9, 2019
0.1.1 Jan 5, 2019
0.1.0 Jan 4, 2019

#21 in #defer

MIT license

16KB
237 lines

"# scoped"

Run callbacks based on success, failure, or exit of a scope.


lib.rs:

This crate provides little utilities to declare callbacks inside a scope, that get executed on success, failure, or exit on that scope.

This is different than the ScopeGuard crate does, because here it's dependent on the scope's outcome which callbacks should run.

No runtime deps