Struct hyper_middleware::error::Error
source · pub struct Error { /* private fields */ }
Expand description
Represents an HTTP Error.
Implementations§
source§impl Error
impl Error
sourcepub fn status(&self) -> Option<&StatusCode>
pub fn status(&self) -> Option<&StatusCode>
Returns an HTTP Status Code reference associated with the underlying error.
sourcepub fn with_status(self, status: StatusCode) -> Self
pub fn with_status(self, status: StatusCode) -> Self
Adds/updates the current HTTP Status Code.
Trait Implementations§
source§impl Error for Error
impl Error for Error
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()