[][src]Struct roa_core::Middleware

pub struct Middleware<M: Model>(_);

Methods

impl<M: Model> Middleware<M>[src]

pub fn new() -> Self[src]

pub fn join<F>(
    &mut self,
    middleware: impl 'static + Sync + Send + Fn(Context<M>, Next) -> F
) -> &mut Self where
    F: 'static + Future<Output = Result<(), Status>> + Send
[src]

pub fn handler(&self) -> Arc<DynHandler<M>>[src]

pub fn app(&self, model: M) -> App<M>[src]

Trait Implementations

impl<M: Clone + Model> Clone for Middleware<M>[src]

Auto Trait Implementations

impl<M> !RefUnwindSafe for Middleware<M>

impl<M> Send for Middleware<M>

impl<M> Sync for Middleware<M>

impl<M> Unpin for Middleware<M>

impl<M> !UnwindSafe for Middleware<M>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.