pub trait AsyncPredicate<Request, B> {
    type Request;
    type Response;
    type Future: Future
    where
        <Self::Future as Future>::Output == Result<Self::Request, Self::Response>
; fn check(&mut self, request: Request) -> Self::Future; }
Expand description

Checks a request asynchronously

Required Associated Types

The type of requests returned by check

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

The type of response return by check if the predicate failed.

The future returned by check

Required Methods

Check whether the given request should be forwarded.

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

Implementors