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

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

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

Fiter trait for filter request.

Required methods

Filter Request and returns false or true.

Provided methods

Create a new filter use And filter.

Create a new filter use Or filter.

Create a new filter use AndThen filter.

Create a new filter use OrElse filter.

Implementors