pub trait Dispatcher<T>: Send + Sync {
    type Result: Send + Sync;

    // Required method
    fn dispatch<'life0, 'life1, 'async_trait>(
        &'life0 self,
        permissions: &'life1 Permissions,
        request: T
    ) -> Pin<Box<dyn Future<Output = Self::Result> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
}
Expand description

Dispatches T to an appropriate handler. This trait is derivable.

Required Associated Types§

type Result: Send + Sync

The type of the result.

Required Methods§

fn dispatch<'life0, 'life1, 'async_trait>( &'life0 self, permissions: &'life1 Permissions, request: T ) -> Pin<Box<dyn Future<Output = Self::Result> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Dispatches request to the appropriate handler while also ensuring permissions allows the request.

Implementors§