Skip to main content

AsyncControllerFn

Trait AsyncControllerFn 

Source
pub trait AsyncControllerFn<'a> {
    type Fut: Future<Output = ControllerResult> + Send + 'a;

    // Required method
    fn call_async(&self, ctx: &'a mut Context) -> Self::Fut;
}
Expand description

Helper trait to express the async function signature with proper lifetimes.

Required Associated Types§

Source

type Fut: Future<Output = ControllerResult> + Send + 'a

Required Methods§

Source

fn call_async(&self, ctx: &'a mut Context) -> Self::Fut

Implementors§

Source§

impl<'a, F, Fut> AsyncControllerFn<'a> for F
where F: Fn(&'a mut Context) -> Fut + Send + Sync, Fut: Future<Output = ControllerResult> + Send + 'a,

Source§

type Fut = Fut