[][src]Trait act_zero::async_fn::ClosureFnMut

pub trait ClosureFnMut<'a, T, P, R> {
    type Future: Future<Output = R> + Send + 'a;
    fn call_closure(self, arg1: &'a mut T, arg2: P) -> Self::Future;
}

We can't even directly express the lifetime bounds of an async fn directly, so we are forced to introduce a trait just to write the required bounds. This trait is for the case when the first argument is &mut T.

Associated Types

type Future: Future<Output = R> + Send + 'a

Type of the future returned by this async fn.

Loading content...

Required methods

fn call_closure(self, arg1: &'a mut T, arg2: P) -> Self::Future

Call this async fn with two arguments.

Loading content...

Implementors

impl<'a, F, T, P, Fut, R> ClosureFnMut<'a, T, P, R> for F where
    Fut: Future<Output = R> + Send + 'a,
    T: 'a,
    F: FnOnce(&'a mut T, P) -> Fut, 
[src]

type Future = Fut

Loading content...