Skip to main content

ThreadAwareAsyncFnOnce

Trait ThreadAwareAsyncFnOnce 

Source
pub trait ThreadAwareAsyncFnOnce<T>: ThreadAware {
    // Required method
    fn call_once(self: Box<Self>) -> BoxFuture<'static, T>;
}
Expand description

Async equivalent of ThreadAwareFnOnce - calls the closure once, returning a BoxFuture.

Use async_closure_once to construct an implementation.

Required Methods§

Source

fn call_once(self: Box<Self>) -> BoxFuture<'static, T>

Calls the async closure, consuming it.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T, D: ThreadAware + 'static> ThreadAwareAsyncFnOnce<T> for AsyncClosure<T, D>
where T: 'static,

Source§

impl<T, D: ThreadAware + 'static> ThreadAwareAsyncFnOnce<T> for AsyncClosureMut<T, D>
where T: 'static,

Source§

impl<T, D: ThreadAware> ThreadAwareAsyncFnOnce<T> for AsyncClosureOnce<T, D>