Struct ferrum::error::FerrumError
[−]
[src]
pub struct FerrumError { pub error: Box<Error + Send>, pub response: Option<Response>, }
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<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.
Methods
impl FerrumError
[src]
fn new<E: 'static + Error + Send>(
error: E,
response: Option<Response>
) -> FerrumError
[src]
error: E,
response: Option<Response>
) -> FerrumError
Create a new FerrumError
from an error and a response.
Trait Implementations
impl Debug for FerrumError
[src]
impl Display for FerrumError
[src]
fn fmt(&self, formatter: &mut Formatter) -> Result<(), Error>
[src]
Formats the value using the given formatter. Read more