Struct Filter
struct Filter<T, U> { ... }
Conditionally dispatch requests to the inner service based on a predicate.
Implementations
impl<T, U> Filter<T, U>
const fn new(inner: T, predicate: U) -> SelfReturns a new
Filterservice wrappinginner.fn layer(predicate: U) -> FilterLayer<U>Returns a new
Layerthat wraps services with aFilterservice with the givenPredicate.fn check<R>(self: &mut Self, request: R) -> Result<<U as >::Request, BoxError> where U: Predicate<R>Check a
Requestvalue against this filter's predicate.fn get_ref(self: &Self) -> &TGet a reference to the inner service
fn get_mut(self: &mut Self) -> &mut TGet a mutable reference to the inner service
fn into_inner(self: Self) -> TConsume
self, returning the inner service
impl<M, S, Target, Request> MakeService for Filter<T, U>
fn poll_ready(self: &mut Self, cx: &mut Context<'_>) -> Poll<Result<(), <M as MakeService<Target, Request>>::MakeError>>fn make_service(self: &mut Self, target: Target) -> <M as MakeService<Target, Request>>::Future
impl<T> Any for Filter<T, U>
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for Filter<T, U>
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for Filter<T, U>
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> CloneToUninit for Filter<T, U>
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)
impl<T> From for Filter<T, U>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> Instrument for Filter<T, U>
impl<T> ToOwned for Filter<T, U>
fn to_owned(self: &Self) -> Tfn clone_into(self: &Self, target: &mut T)
impl<T> WithSubscriber for Filter<T, U>
impl<T, Request> ServiceExt for Filter<T, U>
impl<T, U> Freeze for Filter<T, U>
impl<T, U> Into for Filter<T, U>
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> RefUnwindSafe for Filter<T, U>
impl<T, U> Send for Filter<T, U>
impl<T, U> Sync for Filter<T, U>
impl<T, U> TryFrom for Filter<T, U>
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for Filter<T, U>
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>
impl<T, U> Unpin for Filter<T, U>
impl<T, U> UnwindSafe for Filter<T, U>
impl<T, U, Request> Service for Filter<T, U>
fn poll_ready(self: &mut Self, cx: &mut Context<'_>) -> Poll<Result<(), <Self as >::Error>>fn call(self: &mut Self, request: Request) -> <Self as >::Future
impl<T: $crate::clone::Clone, U: $crate::clone::Clone> Clone for Filter<T, U>
fn clone(self: &Self) -> Filter<T, U>
impl<T: $crate::fmt::Debug, U: $crate::fmt::Debug> Debug for Filter<T, U>
fn fmt(self: &Self, f: &mut $crate::fmt::Formatter<'_>) -> $crate::fmt::Result