Struct warp::reject::Rejection [−][src]
pub struct Rejection { /* fields omitted */ }
Rejection of a request by a Filter
.
Methods
impl Rejection
[src]
impl Rejection
pub fn status(&self) -> StatusCode
[src]
pub fn status(&self) -> StatusCode
Return the HTTP status code that this rejection represents.
pub fn with<E>(self, err: E) -> Self where
E: Into<Cause>,
[src]
pub fn with<E>(self, err: E) -> Self where
E: Into<Cause>,
Add given err
into Rejection
.
pub fn json(&self) -> Response<Body>
[src]
pub fn json(&self) -> Response<Body>
Returns a json response for this rejection.
pub fn cause(&self) -> Option<&Cause>
[src]
pub fn cause(&self) -> Option<&Cause>
Returns an error cause.
pub fn into_cause<T>(self) -> Result<Box<T>, Self> where
T: StdError + Send + Sync + 'static,
[src]
pub fn into_cause<T>(self) -> Result<Box<T>, Self> where
T: StdError + Send + Sync + 'static,
Turn into cause of type T
.
Trait Implementations
impl Debug for Rejection
[src]
impl Debug for Rejection
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Serialize for Rejection
[src]
impl Serialize for Rejection