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. Records 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<&str>
pub fn logger_name(&self) -> Option<&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.
Sourcepub fn key_values(&self) -> KeyValues<'_>
pub fn key_values(&self) -> KeyValues<'_>
Gets the key-values.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Record<'a>
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