pub struct DMSCErrorChain { /* private fields */ }Expand description
A chain of errors with contextual information.
Implementations§
Source§impl DMSCErrorChain
impl DMSCErrorChain
Sourcepub fn with_context<E, S>(source: E, context: S) -> Self
pub fn with_context<E, S>(source: E, context: S) -> Self
Creates a new error chain with context.
Sourcepub fn source_error(&self) -> &(dyn StdError + Send + Sync)
pub fn source_error(&self) -> &(dyn StdError + Send + Sync)
Gets the source error.
Sourcepub fn get_context(&self) -> &str
pub fn get_context(&self) -> &str
Gets the context message.
Sourcepub fn previous(&self) -> Option<&DMSCErrorChain>
pub fn previous(&self) -> Option<&DMSCErrorChain>
Gets the previous error in the chain.
Sourcepub fn chain(&self) -> DMSCErrorChainIter<'_> ⓘ
pub fn chain(&self) -> DMSCErrorChainIter<'_> ⓘ
Iterates through the error chain.
Sourcepub fn root_cause(&self) -> &(dyn StdError + Send + Sync)
pub fn root_cause(&self) -> &(dyn StdError + Send + Sync)
Gets the root cause of the error chain.
Sourcepub fn pretty_format(&self) -> String
pub fn pretty_format(&self) -> String
Formats the error chain as a pretty string.
Trait Implementations§
Source§impl Debug for DMSCErrorChain
impl Debug for DMSCErrorChain
Source§impl Display for DMSCErrorChain
impl Display for DMSCErrorChain
Source§impl Error for DMSCErrorChain
impl Error for DMSCErrorChain
Source§fn source(&self) -> Option<&(dyn StdError + 'static)>
fn source(&self) -> Option<&(dyn StdError + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for DMSCErrorChain
impl !RefUnwindSafe for DMSCErrorChain
impl Send for DMSCErrorChain
impl Sync for DMSCErrorChain
impl Unpin for DMSCErrorChain
impl !UnwindSafe for DMSCErrorChain
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::RequestSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request