pub struct RiErrorChain { /* private fields */ }Expand description
A chain of errors with contextual information.
Implementations§
Source§impl RiErrorChain
impl RiErrorChain
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<&RiErrorChain>
pub fn previous(&self) -> Option<&RiErrorChain>
Gets the previous error in the chain.
Sourcepub fn chain(&self) -> RiErrorChainIter<'_> ⓘ
pub fn chain(&self) -> RiErrorChainIter<'_> ⓘ
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 RiErrorChain
impl Debug for RiErrorChain
Source§impl Display for RiErrorChain
impl Display for RiErrorChain
Source§impl Error for RiErrorChain
impl Error for RiErrorChain
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 RiErrorChain
impl !RefUnwindSafe for RiErrorChain
impl Send for RiErrorChain
impl Sync for RiErrorChain
impl Unpin for RiErrorChain
impl UnsafeUnpin for RiErrorChain
impl !UnwindSafe for RiErrorChain
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