[][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.

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: Response

What to do about this error.

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

Methods

impl IronError[src]

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

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>, 
[src]

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

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

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

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
[src]

impl<T> UnsafeAny for T where
    T: Any