Error

Trait Error 

Source
pub trait Error:
    Debug
    + Display
    + Send {
    // Provided method
    fn source(&self) -> Option<&(dyn Error + 'static)> { ... }
}
Expand description

The generic Error trait. All actual errors implementing this trait also need to implement Debug and Display to provide human readable text of the error.

Provided Methods§

Source

fn source(&self) -> Option<&(dyn Error + 'static)>

the underlaying source of this error, if any. This allows to “stack” errors while keeping track to it’s root cause

Trait Implementations§

Source§

impl<'a, E: Error + 'a + Send> From<E> for Box<dyn Error + Send + 'a>

Source§

fn from(orig: E) -> Box<dyn Error + Send + 'a>

Conviniently convert an Error into a boxed dyn Error. This allows simple usage of .into() calls when returning an Error type.

Implementors§