Struct symbolic::Error
[−]
[src]
pub struct Error(pub ErrorKind, _);
The Error type.
This tuple struct is made of two elements:
- an
ErrorKind
which is used to determine the type of the error. - An internal
State
, not meant for direct use outside oferror_chain
internals, containing:- a backtrace, generated when the error is created.
- an error chain, used for the implementation of
Error::cause()
.
Methods
impl Error
[src]
fn from_kind(kind: ErrorKind) -> Error
[src]
Constructs an error from a kind, and generates a backtrace.
fn with_chain<E, K>(error: E, kind: K) -> Error where
E: Error + Send + 'static,
K: Into<ErrorKind>,
[src]
E: Error + Send + 'static,
K: Into<ErrorKind>,
Constructs a chained error from another error and a kind, and generates a backtrace.
fn with_boxed_chain<K>(error: Box<Error + 'static + Send>, kind: K) -> Error where
K: Into<ErrorKind>,
[src]
K: Into<ErrorKind>,
Construct a chained error from another boxed error and a kind, and generates a backtrace
fn kind(&self) -> &ErrorKind
[src]
Returns the kind of the error.
fn iter(&self) -> Iter
[src]
Iterates over the error chain.
fn backtrace(&self) -> Option<&Backtrace>
[src]
Returns the backtrace associated with this error.
fn chain_err<F, EK>(self, error: F) -> Error where
EK: Into<ErrorKind>,
F: FnOnce() -> EK,
[src]
EK: Into<ErrorKind>,
F: FnOnce() -> EK,
Extends the error chain with a new entry.
Methods from Deref<Target = ErrorKind>
fn description(&self) -> &str
[src]
A string describing the error kind.
Trait Implementations
impl Error for Error
[src]
impl Deref for Error
[src]
impl From<Error> for Error
[src]
impl From<ParseIntError> for Error
[src]
fn from(e: ParseIntError) -> Error
[src]
impl<'a> From<&'a str> for Error
[src]
impl From<String> for Error
[src]
impl From<Error> for Error
[src]
impl From<Error<usize>> for Error
[src]
impl From<ErrorKind> for Error
[src]
impl From<Error> for Error
[src]
impl From<NulError> for Error
[src]
impl From<Utf8Error> for Error
[src]
impl From<Error> for Error
[src]
impl ChainedError for Error
[src]
type ErrorKind = ErrorKind
fn new(kind: ErrorKind, state: State) -> Error
[src]
fn from_kind(kind: <Error as ChainedError>::ErrorKind) -> Error
[src]
fn with_chain<E, K>(error: E, kind: K) -> Error where
E: Error + Send + 'static,
K: Into<<Error as ChainedError>::ErrorKind>,
[src]
E: Error + Send + 'static,
K: Into<<Error as ChainedError>::ErrorKind>,
fn kind(&self) -> &<Error as ChainedError>::ErrorKind
[src]
fn iter(&self) -> Iter
[src]
fn chain_err<F, EK>(self, error: F) -> Error where
EK: Into<ErrorKind>,
F: FnOnce() -> EK,
[src]
EK: Into<ErrorKind>,
F: FnOnce() -> EK,