[][src]Crate scoped

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.

Structs

Guard

A guard is a handle to schedule closures on.

Handle

A handle is a handle back to a deferred closure. In order to cancel the closure, and get back the value the closure was going to be called with, use Handle::cancel.

Traits

Failure

A trait to annotate whether a type is success or failure.

Functions

scoped

Executes the scope scope. A scope is a closure, in which access to a guard is granted. A guard is used to schedule callbacks to run on a scope's success, failure, or exit.

Type Definitions

ScopeResult