Struct throw::Error
[−]
[src]
pub struct Error<E> { /* fields omitted */ }
Represents an error. Stores an original error of type E, and any number of ErrorPoints at which the error was propagated.
Methods
impl<E> Error<E>
[src]
pub fn new(error: E) -> Error<E>
[src]
Creates a new Error with no ErrorPoints
pub fn points(&self) -> &[ErrorPoint]
[src]
Gets all ErrorPoints where this Error was thrown. These are in reverse order, with the first time it was thrown first and the latest time it was thrown last.
ⓘImportant traits for &'a mut Wpub fn original_error(&self) -> &E
[src]
Gets the original error which this Error was constructed with.
ⓘImportant traits for &'a mut Wpub fn error(&self) -> &E
[src]
Gets the original error which this Error was constructed with.
pub fn into_origin(self) -> E
[src]
Move the original error out.
pub fn into_error<N>(self) -> N where
E: Into<N>,
[src]
E: Into<N>,
Take out the original error and transform into another type where the original error can transform into that type.
pub fn transform<NE>(self) -> Error<NE> where
E: Into<NE>,
[src]
E: Into<NE>,
Transforms this Error
Trait Implementations
impl<E> Display for Error<E> where
E: Display,
[src]
E: Display,
fn fmt(&self, fmt: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<E> Debug for Error<E> where
E: Debug,
[src]
E: Debug,