Struct warp::filters::trace::internal::WithTrace

source ·
pub struct WithTrace<FN, F> {
    pub(super) filter: F,
    pub(super) trace: Trace<FN>,
}

Fields§

§filter: F§trace: Trace<FN>

Trait Implementations§

source§

impl<FN: Clone, F: Clone> Clone for WithTrace<FN, F>

source§

fn clone(&self) -> WithTrace<FN, F>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<FN, F> FilterBase for WithTrace<FN, F>
where FN: Fn(Info<'_>) -> Span + Clone + Send, F: Filter + Clone + Send, F::Extract: Reply, F::Error: IsReject,

§

type Extract = (Traced,)

§

type Error = <F as FilterBase>::Error

§

type Future = Instrumented<Inspect<MapOk<<F as FilterBase>::Future, fn(_: <F as FilterBase>::Extract) -> <WithTrace<FN, F> as FilterBase>::Extract>, fn(_: &Result<<WithTrace<FN, F> as FilterBase>::Extract, <F as FilterBase>::Error>)>>

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,

source§

impl<FN: Copy, F: Copy> Copy for WithTrace<FN, F>

Auto Trait Implementations§

§

impl<FN, F> Freeze for WithTrace<FN, F>
where F: Freeze, FN: Freeze,

§

impl<FN, F> RefUnwindSafe for WithTrace<FN, F>

§

impl<FN, F> Send for WithTrace<FN, F>
where F: Send, FN: Send,

§

impl<FN, F> Sync for WithTrace<FN, F>
where F: Sync, FN: Sync,

§

impl<FN, F> Unpin for WithTrace<FN, F>
where F: Unpin, FN: Unpin,

§

impl<FN, F> UnwindSafe for WithTrace<FN, F>
where F: UnwindSafe, FN: 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> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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
source§

impl<T> FilterClone for T
where T: Filter + Clone,