[][src]Struct saphir::middleware::Builder

pub struct Builder<Chain: MiddlewareChain> { /* fields omitted */ }

Builder to apply middleware onto the http stack

Implementations

impl<Chain: MiddlewareChain + 'static> Builder<Chain>[src]

pub fn apply<'a, Mid, E>(
    self,
    mid: Mid,
    include_path: Vec<&str>,
    exclude_path: E
) -> Builder<MiddlewareChainLink<Mid, Chain>> where
    Mid: 'static + Middleware + Sync + Send,
    E: Into<Option<Vec<&'a str>>>, 
[src]

Method to apply a new middleware onto the stack where the include_path vec are all path affected by the middleware, and exclude_path are exclusion amongst the included paths.

use saphir::middleware::Builder as MBuilder;

let builder = MBuilder::default().apply(log_middleware, vec!["/"], None);

Trait Implementations

impl Default for Builder<MiddleChainEnd>[src]

Auto Trait Implementations

impl<Chain> RefUnwindSafe for Builder<Chain> where
    Chain: RefUnwindSafe

impl<Chain> Send for Builder<Chain>

impl<Chain> Sync for Builder<Chain>

impl<Chain> Unpin for Builder<Chain> where
    Chain: Unpin

impl<Chain> UnwindSafe for Builder<Chain> where
    Chain: UnwindSafe

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> Instrument for T[src]

impl<T> Instrument for T[src]

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

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.