[][src]Struct iron::error::IronError

pub struct IronError {
    pub error: Box<dyn Error + Send>,
    pub response: Response,

The type of Errors inside and when using Iron.

IronError 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.


error: Box<dyn Error + Send>

The underlying error

This can be layered and will be logged at the end of an errored request.

response: Response

What to do about this error.

This Response will be used when the error-handling flow finishes.


impl IronError[src]

pub fn new<E: 'static + Error + Send, M: Modifier<Response>>(
    e: E,
    m: M
) -> IronError

Create a new IronError from an error and a modifier.

Trait Implementations

impl Display for IronError[src]

impl Debug for IronError[src]

impl Error for IronError[src]

fn source(&self) -> Option<&(dyn Error + 'static)>1.30.0[src]

The lower-level source of this error, if any. Read more

Auto Trait Implementations

impl !Sync for IronError

impl !Send for IronError

impl Unpin for IronError

impl !RefUnwindSafe for IronError

impl !UnwindSafe for IronError

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T> ToString for T where
    T: Display + ?Sized

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> Any for T where
    T: 'static + ?Sized

impl<T> Typeable for T where
    T: Any

fn get_type(&self) -> TypeId

Get the TypeId of this object.

impl<T> DebugAny for T where
    T: Any + Debug

impl<T> UnsafeAny for T where
    T: Any