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>>
Auto Trait Implementations§
impl !RefUnwindSafe for CustomEyreHandler
impl !UnwindSafe for CustomEyreHandler
impl Forget for CustomEyreHandler
impl Freeze for CustomEyreHandler
impl Move for CustomEyreHandler
impl Send for CustomEyreHandler
impl Sync for CustomEyreHandler
impl Unpin for CustomEyreHandler
impl UnsafeUnpin 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