pub struct Record<'a> { /* private fields */ }
Expand description
Represents a log record.
§Use
Record
structures are passed as arguments to methods Logger::log
.
Loggers forward these structures to its sinks, then sink implementors
manipulate these structures in order to process log records. Record
s are
automatically created by log macros and so are not seen by log users.
Implementations§
source§impl<'a> Record<'a>
impl<'a> Record<'a>
sourcepub fn to_owned(&self) -> RecordOwned
pub fn to_owned(&self) -> RecordOwned
Creates a RecordOwned
that doesn’t have lifetimes.
sourcepub fn logger_name(&self) -> Option<&'a str>
pub fn logger_name(&self) -> Option<&'a str>
Gets the logger name.
sourcepub fn source_location(&self) -> Option<&SourceLocation>
pub fn source_location(&self) -> Option<&SourceLocation>
Gets the source location.
sourcepub fn time(&self) -> SystemTime
pub fn time(&self) -> SystemTime
Gets the time when the record was created.
Trait Implementations§
Auto Trait Implementations§
impl<'a> RefUnwindSafe for Record<'a>
impl<'a> Send for Record<'a>
impl<'a> Sync for Record<'a>
impl<'a> Unpin for Record<'a>
impl<'a> UnwindSafe for Record<'a>
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