Struct warp::reject::Rejection [−][src]
pub struct Rejection { /* fields omitted */ }
Implementations
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);
}
Returns true if this Rejection was made via warp::reject::not_found
.
Example
let rejection = warp::reject();
assert!(rejection.is_not_found());
Trait Implementations
Performs the conversion.
Auto Trait Implementations
impl !RefUnwindSafe for Rejection
impl !UnwindSafe for Rejection
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more