Expand description
Helpers for defining and calling ThreadAware closures.
Structs§
- Async
Closure - Async equivalent of
Closure- can be called multiple times by shared reference. - Async
Closure Mut - Async equivalent of
ClosureMut- can be called multiple times by mutable reference. - Async
Closure Once - Async equivalent of
ClosureOnce- can be called exactly once, consumingself. - Closure
- A common implementation of
ThreadAwareFn. - Closure
Mut - A common implementation of
ThreadAwareFnMut. - Closure
Once - A common implementation of
ThreadAwareFnOnce.
Traits§
- Thread
Aware Async Fn - Async equivalent of
ThreadAwareFn- calls the closure by shared reference, returning aBoxFuture. - Thread
Aware Async FnMut - Async equivalent of
ThreadAwareFnMut- calls the closure by mutable reference, returning aBoxFuture. - Thread
Aware Async FnOnce - Async equivalent of
ThreadAwareFnOnce- calls the closure once, returning aBoxFuture. - Thread
Aware Fn - Marks
Fn()-like closure whose captured values all implementThreadAware. - Thread
Aware FnMut - Marks
FnMut()-like closure whose captured values all implementThreadAware. - Thread
Aware FnOnce - Marks
FnOnce()-like closures whose captured values all implementThreadAware.
Functions§
- async_
closure - Constructs an
AsyncClosure- the async equivalent ofclosure. - async_
closure_ mut - Constructs an
AsyncClosureMut- the async equivalent ofclosure_mut. - async_
closure_ once - Constructs an
AsyncClosureOnce- the async equivalent ofclosure_once. - closure
- Constructs a
Closure. - closure_
mut - Constructs a
ClosureMut. - closure_
once - Constructs a
ClosureOnce.
Type Aliases§
- BoxFuture
- A boxed, pinned,
Sendfuture - the return type of async closure calls.