Struct choices::warp::Rejection [−][src]
pub struct Rejection { /* fields omitted */ }
Implementations
impl Rejection
[src]
impl Rejection
[src]pub fn find<T>(&self) -> Option<&T> where
T: 'static,
[src]
pub fn find<T>(&self) -> Option<&T> where
T: 'static,
[src]Searches this Rejection
for a specific cause.
A Rejection
will accumulate causes over a Filter
chain. This method
can search through them and return the first cause of this type.
Example
#[derive(Debug)] struct Nope; impl warp::reject::Reject for Nope {} let reject = warp::reject::custom(Nope); if let Some(nope) = reject.find::<Nope>() { println!("found it: {:?}", nope); }
pub fn is_not_found(&self) -> bool
[src]
pub fn is_not_found(&self) -> bool
[src]Returns true if this Rejection was made via warp::reject::not_found
.
Example
let rejection = warp::reject(); assert!(rejection.is_not_found());
Trait Implementations
impl From<Infallible> for Rejection
[src]
impl From<Infallible> for Rejection
[src]pub fn from(infallible: Infallible) -> Rejection
[src]
pub fn from(infallible: Infallible) -> Rejection
[src]Performs the conversion.
Auto Trait Implementations
impl !RefUnwindSafe for Rejection
impl Send for Rejection
impl Sync for Rejection
impl Unpin for Rejection
impl !UnwindSafe for Rejection
Blanket Implementations
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<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,