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

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