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]
impl<E> Error<E>
pub fn new(error: E) -> Error<E>
[src]
pub fn new(error: E) -> Error<E>
Creates a new Error with no ErrorPoints
pub fn get_context(&self) -> &[KvPair]
[src]
pub fn get_context(&self) -> &[KvPair]
get context
pub fn points(&self) -> &[ErrorPoint]
[src]
pub fn points(&self) -> &[ErrorPoint]
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 Rpub fn original_error(&self) -> &E
[src]
pub fn original_error(&self) -> &E
Gets the original error which this Error was constructed with.
ⓘImportant traits for &'a mut Rpub fn error(&self) -> &E
[src]
pub fn error(&self) -> &E
Gets the original error which this Error was constructed with.
pub fn into_origin(self) -> E
[src]
pub fn into_origin(self) -> E
Move the original error out.
pub fn into_error<N>(self) -> N where
E: Into<N>,
[src]
pub fn into_error<N>(self) -> N where
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]
pub fn transform<NE>(self) -> Error<NE> where
E: Into<NE>,
Transforms this Error
Trait Implementations
impl<E> Display for Error<E> where
E: Display,
[src]
impl<E> Display for Error<E> where
E: Display,
fn fmt(&self, fmt: &mut Formatter) -> Result
[src]
fn fmt(&self, fmt: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<E> Debug for Error<E> where
E: Debug,
[src]
impl<E> Debug for Error<E> where
E: Debug,
fn fmt(&self, fmt: &mut Formatter) -> Result
[src]
fn fmt(&self, fmt: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<E> Error for Error<E> where
E: Error,
[src]
impl<E> Error for Error<E> where
E: Error,