Middleware

Trait Middleware 

Source
pub trait Middleware<E: Endpoint> {
    type Output: Endpoint;

    // Required method
    fn transform(&self, ep: E) -> Self::Output;
}

Required Associated Types§

Required Methods§

Source

fn transform(&self, ep: E) -> Self::Output

Transform the input Endpoint to another one.

Implementors§

Source§

impl<E, T> Middleware<E> for AddData<T>
where E: Endpoint, T: Clone + Send + Sync + 'static,