pub struct ErrorMessageImpl { /* private fields */ }Expand description
A message containing a boxed Error object.
This allows capturing full stack traces and error chains while still
satisfying the Display requirements of a logger.
Implementations§
Trait Implementations§
Source§impl MessageImpl for ErrorMessageImpl
impl MessageImpl for ErrorMessageImpl
Source§fn level(&self) -> &dyn Display
fn level(&self) -> &dyn Display
Returns the log level (e.g., “INFO”, “DEBUG”) as a displayable object.
Using
&dyn Display ensures zero-copy for static string levels.Source§fn content(&self) -> &dyn Display
fn content(&self) -> &dyn Display
Returns the message body content.
This allows for deferred formatting of complex types like JSON or Error objects.
Source§fn instant(&self) -> SystemTime
fn instant(&self) -> SystemTime
Returns the exact SystemTime when the message was created.
Crucial for maintaining chronological order in asynchronous logging.
Auto Trait Implementations§
impl Freeze for ErrorMessageImpl
impl !RefUnwindSafe for ErrorMessageImpl
impl Send for ErrorMessageImpl
impl Sync for ErrorMessageImpl
impl Unpin for ErrorMessageImpl
impl !UnwindSafe for ErrorMessageImpl
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
§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 moreCreates a shared type from an unshared type.