Trait error_chain::ChainedError [−][src]
This trait is implemented on all the errors generated by the error_chain
macro.
Associated Types
Loading content...Required methods
fn from_kind(kind: Self::ErrorKind) -> Self where
Self: Sized,
[src]
Self: Sized,
Constructs an error from a kind, and generates a backtrace.
fn with_chain<E, K>(error: E, kind: K) -> Self where
Self: Sized,
E: Error + Send + 'static,
K: Into<Self::ErrorKind>,
[src]
Self: Sized,
E: Error + Send + 'static,
K: Into<Self::ErrorKind>,
Constructs a chained error from another error and a kind, and generates a backtrace.
fn kind(&self) -> &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) -> Self where
F: FnOnce() -> EK,
EK: Into<Self::ErrorKind>,
[src]
F: FnOnce() -> EK,
EK: Into<Self::ErrorKind>,
Extends the error chain with a new entry.
Provided methods
fn display_chain<'a>(&'a self) -> DisplayChain<'a, Self>
[src]
Returns an object which implements Display
for printing the full
context of this error.
The full cause chain and backtrace, if present, will be printed.
Implementors
impl ChainedError for error_chain::example_generated::inner::Error
[src]
type ErrorKind = ErrorKind
fn new(kind: ErrorKind, state: State) -> Error
[src]
fn from_kind(kind: Self::ErrorKind) -> Self
[src]
fn with_chain<E, K>(error: E, kind: K) -> Self where
E: Error + Send + 'static,
K: Into<Self::ErrorKind>,
[src]
E: Error + Send + 'static,
K: Into<Self::ErrorKind>,
fn kind(&self) -> &Self::ErrorKind
[src]
fn iter(&self) -> Iter<'_>ⓘ
[src]
fn chain_err<F, EK>(self, error: F) -> Self where
F: FnOnce() -> EK,
EK: Into<ErrorKind>,
[src]
F: FnOnce() -> EK,
EK: Into<ErrorKind>,
fn backtrace(&self) -> Option<&Backtrace>
[src]
fn extract_backtrace(
e: &(dyn Error + Send + 'static)
) -> Option<InternalBacktrace>
[src]
e: &(dyn Error + Send + 'static)
) -> Option<InternalBacktrace>
impl ChainedError for error_chain::example_generated::Error
[src]
type ErrorKind = ErrorKind
fn new(kind: ErrorKind, state: State) -> Error
[src]
fn from_kind(kind: Self::ErrorKind) -> Self
[src]
fn with_chain<E, K>(error: E, kind: K) -> Self where
E: Error + Send + 'static,
K: Into<Self::ErrorKind>,
[src]
E: Error + Send + 'static,
K: Into<Self::ErrorKind>,
fn kind(&self) -> &Self::ErrorKind
[src]
fn iter(&self) -> Iter<'_>ⓘ
[src]
fn chain_err<F, EK>(self, error: F) -> Self where
F: FnOnce() -> EK,
EK: Into<ErrorKind>,
[src]
F: FnOnce() -> EK,
EK: Into<ErrorKind>,
fn backtrace(&self) -> Option<&Backtrace>
[src]
fn extract_backtrace(
e: &(dyn Error + Send + 'static)
) -> Option<InternalBacktrace>
[src]
e: &(dyn Error + Send + 'static)
) -> Option<InternalBacktrace>