Struct FilterLayer

pub struct FilterLayer<U> { /* private fields */ }

Conditionally dispatch requests to the inner service based on a synchronous predicate.

This Layer produces instances of the Filter service.

Implementations

impl<U> FilterLayer<U>

const fn new(predicate: U) -> Self

Returns a new layer that produces Filter services with the given Predicate.

Trait Implementations

impl<U: Clone> Clone for FilterLayer<U>

fn clone(&self) -> Self

impl<U: Clone, S> Layer<S> for FilterLayer<U>

type Service = Filter<S, U>;
fn layer(&self, service: S) -> Self::Service

impl<U: Debug> Debug for FilterLayer<U>

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Auto Trait Implementations

impl<U> Freeze for FilterLayer<U> where U: Freeze,

impl<U> RefUnwindSafe for FilterLayer<U> where U: RefUnwindSafe,

impl<U> Send for FilterLayer<U> where U: Send,

impl<U> Sync for FilterLayer<U> where U: Sync,

impl<U> Unpin for FilterLayer<U> where U: Unpin,

impl<U> UnsafeUnpin for FilterLayer<U> where U: UnsafeUnpin,

impl<U> UnwindSafe for FilterLayer<U> where U: UnwindSafe,

Blanket Implementations

impl<T> Any for FilterLayer<U> where T: 'static + ?Sized,

impl<T> Borrow<T> for FilterLayer<U> where T: ?Sized,

impl<T> BorrowMut<T> for FilterLayer<U> where T: ?Sized,

impl<T> CloneToUninit for FilterLayer<U> where T: Clone,

impl<T> From<T> for FilterLayer<U>

impl<T> Instrument for FilterLayer<U>

impl<T> ToOwned for FilterLayer<U> where T: Clone,

impl<T> WithSubscriber for FilterLayer<U>

impl<T, U> Into<U> for FilterLayer<U> where U: From<T>,

impl<T, U> TryFrom<U> for FilterLayer<U> where U: Into<T>,

impl<T, U> TryInto<U> for FilterLayer<U> where U: TryFrom<T>,