pub struct ErrorContext<E, C> {
pub error: E,
pub context: C,
}
Expand description
Wrap error value together with context information
Fields§
§error: E
§context: C
Trait Implementations§
Source§impl<E, C> Display for ErrorContext<E, C>
impl<E, C> Display for ErrorContext<E, C>
Source§impl<E, C> Error for ErrorContext<E, C>
impl<E, C> Error for ErrorContext<E, C>
Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
Source§impl<E, C, C2> WithContext<C2> for ErrorContext<E, C>
impl<E, C, C2> WithContext<C2> for ErrorContext<E, C>
type ContextError = ErrorContext<ErrorContext<E, C>, C2>
fn with_context(self, context: C2) -> ErrorContext<ErrorContext<E, C>, C2>
Auto Trait Implementations§
impl<E, C> Freeze for ErrorContext<E, C>
impl<E, C> RefUnwindSafe for ErrorContext<E, C>where
E: RefUnwindSafe,
C: RefUnwindSafe,
impl<E, C> Send for ErrorContext<E, C>
impl<E, C> Sync for ErrorContext<E, C>
impl<E, C> Unpin for ErrorContext<E, C>
impl<E, C> UnwindSafe for ErrorContext<E, C>where
E: UnwindSafe,
C: UnwindSafe,
Blanket Implementations§
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