pub struct ErrorReporter<E, C>{
pub error: E,
pub context: C,
}Expand description
A general purpose error reporting type for holding generic errors and associating generic context with those errors
This type is intended to be consumed by a library that implements a concrete error type that is
designed for the specific use cases the user has. The library implementer should provide two
types, an error type of their choice, and a Context type that implements the two main helper
traits, ErrorFormatter and ErrorContext
Fields§
§error: E§context: CImplementations§
Trait Implementations§
Source§impl<C, E> From<E> for ErrorReporter<E, C>
impl<C, E> From<E> for ErrorReporter<E, C>
Source§impl<C, CO, E> IntoErrorReporter<E, C, CO> for ErrorReporter<E, C>
impl<C, CO, E> IntoErrorReporter<E, C, CO> for ErrorReporter<E, C>
fn ext_context(self, context: CO) -> ErrorReporter<E, C>
Auto Trait Implementations§
impl<E, C> Freeze for ErrorReporter<E, C>
impl<E, C> RefUnwindSafe for ErrorReporter<E, C>where
E: RefUnwindSafe,
C: RefUnwindSafe,
impl<E, C> Send for ErrorReporter<E, C>where
C: Send,
impl<E, C> Sync for ErrorReporter<E, C>where
C: Sync,
impl<E, C> Unpin for ErrorReporter<E, C>
impl<E, C> UnwindSafe for ErrorReporter<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