pub struct FerrumError {
pub error: Box<dyn Error + Send>,
pub response: Option<Response>,
}
Expand description
The type of Errors inside and when using Ferrum.
FerrumError
informs its receivers of two things:
- What went wrong
- What to do about it
The error
field is responsible for informing receivers of which
error occured, and receivers may also modify the error field by layering
it (building up a cause chain).
The response
field provides a tangible action to be taken if this error
is not otherwise handled.
Fields§
§error: Box<dyn Error + Send>
The underlying error
This can be layered and will be logged at the end of an errored request.
response: Option<Response>
What to do about this error.
This Response will be used when the error-handling flow finishes.
Implementations§
Source§impl FerrumError
impl FerrumError
Trait Implementations§
Source§impl Debug for FerrumError
impl Debug for FerrumError
Source§impl Display for FerrumError
impl Display for FerrumError
Source§impl Error for FerrumError
impl Error for FerrumError
Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§fn cause(&self) -> Option<&dyn Error>
fn cause(&self) -> Option<&dyn Error>
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§impl From<FerrumError> for Response
impl From<FerrumError> for Response
Source§fn from(error: FerrumError) -> HyperResponse
fn from(error: FerrumError) -> HyperResponse
Converts to this type from the input type.
Auto Trait Implementations§
impl !Freeze for FerrumError
impl !RefUnwindSafe for FerrumError
impl Send for FerrumError
impl !Sync for FerrumError
impl Unpin for FerrumError
impl !UnwindSafe for FerrumError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more