[−][src]Struct rweb::Rejection
Methods
impl Rejection
[src]
pub fn find<T>(&self) -> Option<&T> where
T: 'static,
[src]
T: 'static,
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]
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 Debug for Rejection
[src]
impl Entity for Rejection
[src]
impl From<Infallible> for Rejection
[src]
fn from(infallible: Infallible) -> Rejection
[src]
impl ResponseEntity for Rejection
[src]
fn describe_responses() -> Responses
[src]
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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,