Struct warp::filters::path::Exact

source ·
pub struct Exact<P>(P);
Expand description

A Filter matching an exact path segment.

Constructed from path() or path!().

Tuple Fields§

§0: P

Trait Implementations§

source§

impl<P: Clone> Clone for Exact<P>

source§

fn clone(&self) -> Exact<P>

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<P> FilterBase for Exact<P>
where P: AsRef<str>,

§

type Extract = ()

§

type Error = Rejection

§

type Future = Ready<Result<<Exact<P> as FilterBase>::Extract, <Exact<P> 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<P: Copy> Copy for Exact<P>

Auto Trait Implementations§

§

impl<P> Freeze for Exact<P>
where P: Freeze,

§

impl<P> RefUnwindSafe for Exact<P>
where P: RefUnwindSafe,

§

impl<P> Send for Exact<P>
where P: Send,

§

impl<P> Sync for Exact<P>
where P: Sync,

§

impl<P> Unpin for Exact<P>
where P: Unpin,

§

impl<P> UnwindSafe for Exact<P>
where P: 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,