Trait tower::filter::Predicate[][src]

pub trait Predicate<Request> {
    type Request;
    fn check(&mut self, request: Request) -> Result<Self::Request, BoxError>;
}
This is supported on crate feature filter only.

Checks a request synchronously.

Associated Types

type Request[src]

The type of requests returned by check.

This request is forwarded to the inner service if the predicate succeeds.

Loading content...

Required methods

fn check(&mut self, request: Request) -> Result<Self::Request, BoxError>[src]

Check whether the given request should be forwarded.

If the future resolves with Ok, the request is forwarded to the inner service.

Loading content...

Implementors

impl<F, T, R, E> Predicate<T> for F where
    F: FnMut(T) -> Result<R, E>,
    E: Into<BoxError>, 
[src]

type Request = R

Loading content...