[−][src]Trait act_zero::async_fn::AsyncFnOnce
Trait for async methods which take &T
as the argument type.
Associated Types
Loading content...Required methods
fn call(self, arg: &T) -> BoxFuture<Self::Output>
Call this function.
fn call_boxed(self: Box<Self>, arg: &T) -> BoxFuture<Self::Output>
Call this function when self
is boxed.
Provided methods
fn map<G, R>(self, g: G) -> AsyncMap<Self, G> where
G: FnOnce(Self::Output, &T) -> R,
Self: Sized,
G: FnOnce(Self::Output, &T) -> R,
Self: Sized,
Similar to FutureExt::map
, except the callback also has access to the argument.
fn bind_output(self, tx: Sender<Self::Output>) -> BindOutput<Self, Self::Output> where
Self: Sized,
Self: Sized,
Bind the output of this async function to this oneshot channel: when the future completes, the output will be sent on the channel.
Implementations on Foreign Types
impl<T, F: ?Sized> AsyncFnOnce<T> for Box<F> where
F: AsyncFnOnce<T>,
[src]
F: AsyncFnOnce<T>,
type Output = F::Output
fn call(self, arg: &T) -> BoxFuture<Self::Output>
[src]
fn call_boxed(self: Box<Self>, arg: &T) -> BoxFuture<Self::Output>
[src]
Implementors
impl<F, G, T, R> AsyncFnOnce<T> for AsyncMap<F, G> where
F: AsyncFnOnce<T>,
G: FnOnce(F::Output, &T) -> R + Send + 'static,
R: Send + 'static,
T: Sync,
[src]
F: AsyncFnOnce<T>,
G: FnOnce(F::Output, &T) -> R + Send + 'static,
R: Send + 'static,
T: Sync,
type Output = R
fn call(self, arg: &T) -> BoxFuture<R>
[src]
fn call_boxed(self: Box<Self>, arg: &T) -> BoxFuture<Self::Output>
[src]
impl<F, T, P, R> AsyncFnOnce<T> for Closure<R, F, P> where
F: for<'a> ClosureFn<'a, T, P, R>,
R: Send + 'static,
[src]
F: for<'a> ClosureFn<'a, T, P, R>,
R: Send + 'static,
type Output = R
fn call(self, arg: &T) -> BoxFuture<R>
[src]
fn call_boxed(self: Box<Self>, arg: &T) -> BoxFuture<Self::Output>
[src]
impl<F, T, R> AsyncFnOnce<T> for BindOutput<F, R> where
F: AsyncFnOnce<T, Output = R>,
R: Send + 'static,
[src]
F: AsyncFnOnce<T, Output = R>,
R: Send + 'static,