Struct choices::warp::filters::BoxedFilter [−][src]
pub struct BoxedFilter<T> where
T: Tuple, { /* fields omitted */ }
A type representing a boxed Filter
trait object.
The filter inside is a dynamic trait object. The purpose of this type is
to ease returning Filter
s from other functions.
To create one, call Filter::boxed
on any filter.
Examples
use warp::{Filter, filters::BoxedFilter, Reply}; pub fn assets_filter() -> BoxedFilter<(impl Reply,)> { warp::path("assets") .and(warp::fs::dir("./assets")) .boxed() }
Trait Implementations
impl<T> Clone for BoxedFilter<T> where
T: Tuple,
[src]
impl<T> Clone for BoxedFilter<T> where
T: Tuple,
[src]pub fn clone(&self) -> BoxedFilter<T>
[src]
pub fn clone(&self) -> BoxedFilter<T>
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl<T> !RefUnwindSafe for BoxedFilter<T>
impl<T> Send for BoxedFilter<T>
impl<T> Sync for BoxedFilter<T>
impl<T> Unpin for BoxedFilter<T>
impl<T> !UnwindSafe for BoxedFilter<T>
Blanket Implementations
impl<T> Filter for T where
T: FilterBase,
[src]
impl<T> Filter for T where
T: FilterBase,
[src]fn and<F>(self, other: F) -> And<Self, F> where
F: Filter + Clone,
<Self::Extract as Tuple>::HList: Combine<<<F as FilterBase>::Extract as Tuple>::HList>,
<F as FilterBase>::Error: CombineRejection<Self::Error>,
[src]
fn and<F>(self, other: F) -> And<Self, F> where
F: Filter + Clone,
<Self::Extract as Tuple>::HList: Combine<<<F as FilterBase>::Extract as Tuple>::HList>,
<F as FilterBase>::Error: CombineRejection<Self::Error>,
[src]Composes a new Filter
that requires both this and the other to filter a request. Read more
fn or<F>(self, other: F) -> Or<Self, F> where
Self: Filter<Error = Rejection>,
F: Filter,
<F as FilterBase>::Error: CombineRejection<Self::Error>,
[src]
fn or<F>(self, other: F) -> Or<Self, F> where
Self: Filter<Error = Rejection>,
F: Filter,
<F as FilterBase>::Error: CombineRejection<Self::Error>,
[src]Composes a new Filter
of either this or the other filter. Read more
fn map<F>(self, fun: F) -> Map<Self, F> where
F: Func<Self::Extract> + Clone,
[src]
fn map<F>(self, fun: F) -> Map<Self, F> where
F: Func<Self::Extract> + Clone,
[src]Composes this Filter
with a function receiving the extracted value. Read more
fn and_then<F>(self, fun: F) -> AndThen<Self, F> where
F: Func<Self::Extract> + Clone,
<F as Func<Self::Extract>>::Output: TryFuture,
<F as Func<Self::Extract>>::Output: Send,
<<F as Func<Self::Extract>>::Output as TryFuture>::Error: CombineRejection<Self::Error>,
[src]
fn and_then<F>(self, fun: F) -> AndThen<Self, F> where
F: Func<Self::Extract> + Clone,
<F as Func<Self::Extract>>::Output: TryFuture,
<F as Func<Self::Extract>>::Output: Send,
<<F as Func<Self::Extract>>::Output as TryFuture>::Error: CombineRejection<Self::Error>,
[src]Composes this Filter
with a function receiving the extracted value. Read more
fn or_else<F>(self, fun: F) -> OrElse<Self, F> where
Self: Filter<Error = Rejection>,
F: Func<Rejection>,
<F as Func<Rejection>>::Output: TryFuture,
<F as Func<Rejection>>::Output: Send,
<<F as Func<Rejection>>::Output as TryFuture>::Error: IsReject,
<<F as Func<Rejection>>::Output as TryFuture>::Ok == Self::Extract,
[src]
fn or_else<F>(self, fun: F) -> OrElse<Self, F> where
Self: Filter<Error = Rejection>,
F: Func<Rejection>,
<F as Func<Rejection>>::Output: TryFuture,
<F as Func<Rejection>>::Output: Send,
<<F as Func<Rejection>>::Output as TryFuture>::Error: IsReject,
<<F as Func<Rejection>>::Output as TryFuture>::Ok == Self::Extract,
[src]Compose this Filter
with a function receiving an error. Read more
fn recover<F>(self, fun: F) -> Recover<Self, F> where
Self: Filter<Error = Rejection>,
F: Func<Rejection>,
<F as Func<Rejection>>::Output: TryFuture,
<F as Func<Rejection>>::Output: Send,
<<F as Func<Rejection>>::Output as TryFuture>::Error: IsReject,
[src]
fn recover<F>(self, fun: F) -> Recover<Self, F> where
Self: Filter<Error = Rejection>,
F: Func<Rejection>,
<F as Func<Rejection>>::Output: TryFuture,
<F as Func<Rejection>>::Output: Send,
<<F as Func<Rejection>>::Output as TryFuture>::Error: IsReject,
[src]Compose this Filter
with a function receiving an error and
returning a new type, instead of the same type. Read more
fn unify<T>(self) -> Unify<Self> where
Self: Filter<Extract = (Either<T, T>,)>,
T: Tuple,
[src]
fn unify<T>(self) -> Unify<Self> where
Self: Filter<Extract = (Either<T, T>,)>,
T: Tuple,
[src]Unifies the extracted value of Filter
s composed with or
. Read more
fn untuple_one<T>(self) -> UntupleOne<Self> where
Self: Filter<Extract = (T,)>,
T: Tuple,
[src]
fn untuple_one<T>(self) -> UntupleOne<Self> where
Self: Filter<Extract = (T,)>,
T: Tuple,
[src]Convenience method to remove one layer of tupling. Read more
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
[src]
fn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
[src]
fn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
[src]impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
[src]
fn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
[src]
fn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
[src]impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,