pub struct SinkError(pub SinkErrorKind, _);Expand description
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().
Tuple Fields
0: SinkErrorKindThe kind of the error.
Implementations
sourceimpl SinkError
impl SinkError
sourcepub fn from_kind(kind: SinkErrorKind) -> SinkError
pub fn from_kind(kind: SinkErrorKind) -> SinkError
Constructs an error from a kind, and generates a backtrace.
sourcepub fn with_chain<E, K>(error: E, kind: K) -> SinkError where
E: Error + Send + 'static,
K: Into<SinkErrorKind>,
pub fn with_chain<E, K>(error: E, kind: K) -> SinkError where
E: Error + Send + 'static,
K: Into<SinkErrorKind>,
Constructs a chained error from another error and a kind, and generates a backtrace.
sourcepub fn with_boxed_chain<K>(error: Box<dyn Error + Send>, kind: K) -> SinkError where
K: Into<SinkErrorKind>,
pub fn with_boxed_chain<K>(error: Box<dyn Error + Send>, kind: K) -> SinkError where
K: Into<SinkErrorKind>,
Construct a chained error from another boxed error and a kind, and generates a backtrace
sourcepub fn kind(&self) -> &SinkErrorKind
pub fn kind(&self) -> &SinkErrorKind
Returns the kind of the error.
sourcepub fn backtrace(&self) -> Option<&Backtrace>
pub fn backtrace(&self) -> Option<&Backtrace>
Returns the backtrace associated with this error.
sourcepub fn chain_err<F, EK>(self, error: F) -> SinkError where
F: FnOnce() -> EK,
EK: Into<SinkErrorKind>,
pub fn chain_err<F, EK>(self, error: F) -> SinkError where
F: FnOnce() -> EK,
EK: Into<SinkErrorKind>,
Extends the error chain with a new entry.
sourcepub fn description(&self) -> &str
pub fn description(&self) -> &str
A short description of the error.
This method is identical to Error::description()
Trait Implementations
sourceimpl ChainedError for SinkError
impl ChainedError for SinkError
type ErrorKind = SinkErrorKind
type ErrorKind = SinkErrorKind
Associated kind type.
sourcefn from_kind(kind: Self::ErrorKind) -> Self
fn from_kind(kind: Self::ErrorKind) -> Self
Constructs an error from a kind, and generates a backtrace.
sourcefn with_chain<E, K>(error: E, kind: K) -> Self where
E: Error + Send + 'static,
K: Into<Self::ErrorKind>,
fn with_chain<E, K>(error: E, kind: K) -> Self where
E: Error + Send + 'static,
K: Into<Self::ErrorKind>,
Constructs a chained error from another error and a kind, and generates a backtrace.
sourcefn chain_err<F, EK>(self, error: F) -> Self where
F: FnOnce() -> EK,
EK: Into<SinkErrorKind>,
fn chain_err<F, EK>(self, error: F) -> Self where
F: FnOnce() -> EK,
EK: Into<SinkErrorKind>,
Extends the error chain with a new entry.
sourcefn display_chain(&'a self) -> DisplayChain<'a, Self>
fn display_chain(&'a self) -> DisplayChain<'a, Self>
Returns an object which implements Display for printing the full
context of this error. Read more
sourceimpl Error for SinkError
impl Error for SinkError
sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourceimpl From<SinkError> for CommitError
impl From<SinkError> for CommitError
sourceimpl From<SinkError> for CompactError
impl From<SinkError> for CompactError
sourceimpl From<SinkError> for SinkErrorKind
impl From<SinkError> for SinkErrorKind
sourceimpl From<SinkErrorKind> for SinkError
impl From<SinkErrorKind> for SinkError
sourcefn from(e: SinkErrorKind) -> Self
fn from(e: SinkErrorKind) -> Self
Converts to this type from the input type.
sourceimpl From<TrustError> for SinkError
impl From<TrustError> for SinkError
sourcefn from(e: TrustError) -> Self
fn from(e: TrustError) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl !RefUnwindSafe for SinkError
impl Send for SinkError
impl !Sync for SinkError
impl Unpin for SinkError
impl !UnwindSafe for SinkError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more