Struct warp::filter::boxed::BoxingFilter

source ·
struct BoxingFilter<F> {
    filter: F,
}

Fields§

§filter: F

Trait Implementations§

source§

impl<F> FilterBase for BoxingFilter<F>
where F: Filter, F::Future: Send + 'static,

§

type Extract = <F as FilterBase>::Extract

§

type Error = <F as FilterBase>::Error

§

type Future = Pin<Box<dyn Future<Output = Result<<BoxingFilter<F> as FilterBase>::Extract, <BoxingFilter<F> as FilterBase>::Error>> + Send>>

source§

fn filter(&self, _: Internal) -> Self::Future

source§

fn map_err<F, E>(self, _internal: Internal, fun: F) -> MapErr<Self, F>
where Self: Sized, F: Fn(Self::Error) -> E + Clone, E: Debug + Send,

Auto Trait Implementations§

§

impl<F> Freeze for BoxingFilter<F>
where F: Freeze,

§

impl<F> RefUnwindSafe for BoxingFilter<F>
where F: RefUnwindSafe,

§

impl<F> Send for BoxingFilter<F>
where F: Send,

§

impl<F> Sync for BoxingFilter<F>
where F: Sync,

§

impl<F> Unpin for BoxingFilter<F>
where F: Unpin,

§

impl<F> UnwindSafe for BoxingFilter<F>
where F: UnwindSafe,

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> Filter for T
where T: FilterBase,

source§

fn and<F>(self, other: F) -> And<Self, F>
where Self: Sized, <Self::Extract as Tuple>::HList: Combine<<F::Extract as Tuple>::HList>, F: Filter + Clone, F::Error: CombineRejection<Self::Error>,

Composes a new Filter that requires both this and the other to filter a request. Read more
source§

fn or<F>(self, other: F) -> Or<Self, F>
where Self: Filter<Error = Rejection> + Sized, F: Filter, F::Error: CombineRejection<Self::Error>,

Composes a new Filter of either this or the other filter. Read more
source§

fn map<F>(self, fun: F) -> Map<Self, F>
where Self: Sized, F: Func<Self::Extract> + Clone,

Composes this Filter with a function receiving the extracted value. Read more
source§

fn then<F>(self, fun: F) -> Then<Self, F>
where Self: Sized, F: Func<Self::Extract> + Clone, F::Output: Future + Send,

Composes this Filter with an async function receiving the extracted value. Read more
source§

fn and_then<F>(self, fun: F) -> AndThen<Self, F>
where Self: Sized, F: Func<Self::Extract> + Clone, F::Output: TryFuture + Send, <F::Output as TryFuture>::Error: CombineRejection<Self::Error>,

Composes this Filter with a fallible async function receiving the extracted value. Read more
source§

fn or_else<F>(self, fun: F) -> OrElse<Self, F>
where Self: Filter<Error = Rejection> + Sized, F: Func<Rejection>, F::Output: TryFuture<Ok = Self::Extract> + Send, <F::Output as TryFuture>::Error: IsReject,

Compose this Filter with a function receiving an error. Read more
source§

fn recover<F>(self, fun: F) -> Recover<Self, F>
where Self: Filter<Error = Rejection> + Sized, F: Func<Rejection>, F::Output: TryFuture + Send, <F::Output as TryFuture>::Error: IsReject,

Compose this Filter with a function receiving an error and returning a new type, instead of the same type. Read more
source§

fn unify<T>(self) -> Unify<Self>
where Self: Filter<Extract = (Either<T, T>,)> + Sized, T: Tuple,

Unifies the extracted value of Filters composed with or. Read more
source§

fn untuple_one<T>(self) -> UntupleOne<Self>
where Self: Filter<Extract = (T,)> + Sized, T: Tuple,

Convenience method to remove one layer of tupling. Read more
source§

fn with<W>(self, wrapper: W) -> W::Wrapped
where Self: Sized, W: Wrap<Self>,

Wraps the current filter with some wrapper. Read more
source§

fn boxed(self) -> BoxedFilter<Self::Extract>
where Self: Sized + Send + Sync + 'static, Self::Extract: Send, Self::Error: Into<Rejection>,

Boxes this filter into a trait object, making it easier to name the type. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

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

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

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

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more