pub struct CustomEyreHandler { /* private fields */ }Expand description
This is used to wrap the default EyreHandler but simply expose the CustomEyreHandler::location field via CustomEyreHandler::get_location This allows the code in [crate::libs::ws::internal_error_to_resp] to access the original caller location which is then stored in a [tracing::Field] for access within [error_aggregation::ErrorAggregationLayer::on_event] (see trait impl) so that the original caller can be recorded within the displayed target
Implementations§
Source§impl CustomEyreHandler
impl CustomEyreHandler
pub fn default_with_location_saving( error: &(dyn Error + 'static), ) -> Box<dyn EyreHandler>
pub fn get_location(&self) -> &Option<&'static Location<'static>>
Trait Implementations§
Source§impl EyreHandler for CustomEyreHandler
impl EyreHandler for CustomEyreHandler
Source§fn display(
&self,
error: &(dyn Error + 'static),
f: &mut Formatter<'_>,
) -> Result
fn display( &self, error: &(dyn Error + 'static), f: &mut Formatter<'_>, ) -> Result
Override for the
Display formatSource§fn debug(&self, error: &(dyn Error + 'static), f: &mut Formatter<'_>) -> Result
fn debug(&self, error: &(dyn Error + 'static), f: &mut Formatter<'_>) -> Result
Define the report format Read more
Source§fn track_caller(&mut self, location: &'static Location<'static>)
fn track_caller(&mut self, location: &'static Location<'static>)
Store the location of the caller who constructed this error report
Auto Trait Implementations§
impl Freeze for CustomEyreHandler
impl !RefUnwindSafe for CustomEyreHandler
impl Send for CustomEyreHandler
impl Sync for CustomEyreHandler
impl Unpin for CustomEyreHandler
impl UnsafeUnpin for CustomEyreHandler
impl !UnwindSafe for CustomEyreHandler
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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 more