Struct terra_rust_api::errors::Error [−][src]
pub struct Error(pub ErrorKind, _);
The Error type.
This tuple struct is made of two elements:
- an
ErrorKindwhich is used to determine the type of the error. - An internal
State, not meant for direct use outside oferror_chaininternals, containing:- a backtrace, generated when the error is created.
- an error chain, used for the implementation of
Error::cause().
Implementations
impl Error[src]
impl Error[src]pub fn from_kind(kind: ErrorKind) -> Error[src]
Constructs an error from a kind, and generates a backtrace.
pub 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.
pub fn with_boxed_chain<K>(error: Box<dyn Error + 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
pub fn kind(&self) -> &ErrorKind[src]
Returns the kind of the error.
pub fn iter(&self) -> Iter<'_>[src]
Iterates over the error chain.
pub fn backtrace(&self) -> Option<&Backtrace>[src]
Returns the backtrace associated with this error.
pub fn chain_err<F, EK>(self, error: F) -> Error where
F: FnOnce() -> EK,
EK: Into<ErrorKind>, [src]
F: FnOnce() -> EK,
EK: Into<ErrorKind>,
Extends the error chain with a new entry.
pub fn description(&self) -> &str[src]
A short description of the error.
This method is identical to Error::description()
Trait Implementations
impl ChainedError for Error[src]
impl ChainedError for Error[src]type ErrorKind = ErrorKind
Associated kind type.
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>
pub fn display_chain(&'a self) -> DisplayChain<'a, Self>[src]
impl From<FromHexError> for Error[src]
impl From<FromHexError> for Error[src]fn from(e: FromHexError) -> Self[src]
impl From<ParseIntError> for Error[src]
impl From<ParseIntError> for Error[src]fn from(e: ParseIntError) -> Self[src]
Auto Trait Implementations
impl !RefUnwindSafe for Error
impl !RefUnwindSafe for Errorimpl !UnwindSafe for Error
impl !UnwindSafe for ErrorBlanket Implementations
impl<T> Instrument for T[src]
impl<T> Instrument for T[src]pub fn instrument(self, span: Span) -> Instrumented<Self>[src]
pub fn in_current_span(self) -> Instrumented<Self>[src]
impl<T> Same<T> for T
impl<T> Same<T> for Ttype Output = T
Should always be Self