[][src]Trait salvo::routing::Filter

pub trait Filter: 'static + Send + Sync {
    pub fn filter(&self, req: &mut Request, path: &mut PathState) -> bool;

    pub fn and<F>(self, other: F) -> And<Self, F>
    where
        F: Filter + Sync + Send
, { ... }
pub fn or<F>(self, other: F) -> Or<Self, F>
    where
        F: Filter + Sync + Send
, { ... }
pub fn and_then<F, U>(self, fun: F) -> AndThen<Self, F>
    where
        F: Fn(&mut Request, &mut PathState) -> bool + Send + Sync + 'static,
        U: Filter + Sync + Send
, { ... }
pub fn or_else<F, U>(self, fun: F) -> OrElse<Self, F>
    where
        F: Fn(&mut Request, &mut PathState) -> bool + Send + Sync + 'static,
        U: Filter + Sync + Send
, { ... } }

Required methods

pub fn filter(&self, req: &mut Request, path: &mut PathState) -> bool[src]

Loading content...

Provided methods

pub fn and<F>(self, other: F) -> And<Self, F> where
    F: Filter + Sync + Send
[src]

pub fn or<F>(self, other: F) -> Or<Self, F> where
    F: Filter + Sync + Send
[src]

pub fn and_then<F, U>(self, fun: F) -> AndThen<Self, F> where
    F: Fn(&mut Request, &mut PathState) -> bool + Send + Sync + 'static,
    U: Filter + Sync + Send
[src]

pub fn or_else<F, U>(self, fun: F) -> OrElse<Self, F> where
    F: Fn(&mut Request, &mut PathState) -> bool + Send + Sync + 'static,
    U: Filter + Sync + Send
[src]

Loading content...

Implementors

impl<F> Filter for FnFilter<F> where
    F: Fn(&mut Request, &mut PathState) -> bool + Send + Sync + 'static, 
[src]

Loading content...