Struct terra_rust_wallet::errors::Error[][src]

pub struct Error(pub ErrorKind, _);
Expand description

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 of error_chain internals, containing:
    • a backtrace, generated when the error is created.
    • an error chain, used for the implementation of Error::cause().

Implementations

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]

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]

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]

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]

type ErrorKind = ErrorKind

Associated kind type.

fn new(kind: ErrorKind, state: State) -> Error[src]

fn from_kind(kind: Self::ErrorKind) -> Self[src]

Constructs an error from a kind, and generates a backtrace.

fn with_chain<E, K>(error: E, kind: K) -> Self where
    E: Error + Send + 'static,
    K: Into<Self::ErrorKind>, 
[src]

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 chain_err<F, EK>(self, error: F) -> Self where
    F: FnOnce() -> EK,
    EK: Into<ErrorKind>, 
[src]

Extends the error chain with a new entry.

fn backtrace(&self) -> Option<&Backtrace>[src]

Returns the backtrace associated with this error.

fn extract_backtrace(
    e: &(dyn Error + Send + 'static)
) -> Option<InternalBacktrace>
[src]

fn display_chain(&'a self) -> DisplayChain<'a, Self>[src]

Returns an object which implements Display for printing the full context of this error. Read more

impl Debug for Error[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl Display for Error[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl Error for Error[src]

fn description(&self) -> &str[src]

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

fn source(&self) -> Option<&(dyn Error + 'static)>[src]

The lower-level source of this error, if any. Read more

fn backtrace(&self) -> Option<&Backtrace>[src]

🔬 This is a nightly-only experimental API. (backtrace)

Returns a stack backtrace, if available, of where this error occurred. Read more

fn cause(&self) -> Option<&dyn Error>1.0.0[src]

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

impl<'a> From<&'a str> for Error[src]

fn from(s: &'a str) -> Self[src]

Performs the conversion.

impl From<Box<dyn Error + 'static + Sync + Send, Global>> for Error[src]

fn from(e: Box<dyn Error + Sync + Send>) -> Self[src]

Performs the conversion.

impl From<Box<dyn Error + 'static, Global>> for Error[src]

fn from(e: Box<dyn Error>) -> Self[src]

Performs the conversion.

impl From<Error> for Error[src]

fn from(e: Error) -> Self[src]

Performs the conversion.

impl From<Error> for Error[src]

fn from(e: Error) -> Self[src]

Performs the conversion.

impl From<Error> for ErrorKind[src]

fn from(e: Error) -> Self[src]

Performs the conversion.

impl From<ErrorKind> for Error[src]

fn from(e: ErrorKind) -> Self[src]

Performs the conversion.

impl From<KeyringError> for Error[src]

fn from(e: KeyringError) -> Self[src]

Performs the conversion.

impl From<String> for Error[src]

fn from(s: String) -> Self[src]

Performs the conversion.

Auto Trait Implementations

impl !RefUnwindSafe for Error

impl Send for Error

impl !Sync for Error

impl Unpin for Error

impl !UnwindSafe for Error

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T> Instrument for T[src]

fn instrument(self, span: Span) -> Instrumented<Self>[src]

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

fn in_current_span(self) -> Instrumented<Self>[src]

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToString for T where
    T: Display + ?Sized
[src]

pub default fn to_string(&self) -> String[src]

Converts the given value to a String. Read more

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

pub fn vzip(self) -> V