tower::filterTrait AsyncPredicate
Source pub trait AsyncPredicate<Request> {
type Future: Future<Output = Result<Self::Request, BoxError>>;
type Request;
// Required method
fn check(&mut self, request: Request) -> Self::Future;
}
Expand description
Checks a request asynchronously.
The future returned by check
.
The type of requests returned by check
.
This request is forwarded to the inner service if the predicate
succeeds.
Check whether the given request should be forwarded.
If the future resolves with Ok
, the request is forwarded to the inner service.