pub struct Record<'a> { /* private fields */ }Expand description
The payload of a log message.
Implementations§
Source§impl<'a> Record<'a>
impl<'a> Record<'a>
Sourcepub fn time(&self) -> SystemTime
pub fn time(&self) -> SystemTime
The observed time.
Sourcepub fn target(&self) -> &'a str
pub fn target(&self) -> &'a str
The name of the target of the directive.
This is typically the same as the module path, but can be set explicitly.
Sourcepub fn target_static(&self) -> Option<&'a str>
pub fn target_static(&self) -> Option<&'a str>
The name of the target of the directive, if it is a 'static str.
This is typically the same as the module path, but can be set explicitly.
Sourcepub fn module_path(&self) -> Option<&'a str>
pub fn module_path(&self) -> Option<&'a str>
The module path of the message.
Sourcepub fn module_path_static(&self) -> Option<&'static str>
pub fn module_path_static(&self) -> Option<&'static str>
The module path of the message, if it is a 'static str.
Sourcepub fn file_static(&self) -> Option<&'static str>
pub fn file_static(&self) -> Option<&'static str>
The source file containing the message, if it is a 'static str.
Sourcepub fn line(&self) -> Option<u32>
pub fn line(&self) -> Option<u32>
The line number in the source file.
This is typically set by the logging macro. If set, returns Some(column); otherwise,
returns None.
Sourcepub fn column(&self) -> Option<u32>
pub fn column(&self) -> Option<u32>
The column number in the source file.
This is typically not set. If set, returns Some(column); otherwise, returns None.
Sourcepub fn payload_static(&self) -> Option<&'static str>
pub fn payload_static(&self) -> Option<&'static str>
The message body, if it is a 'static str.
Sourcepub fn key_values(&self) -> &KeyValues<'a>
pub fn key_values(&self) -> &KeyValues<'a>
The key-values.
Sourcepub fn to_owned(&self) -> RecordOwned
pub fn to_owned(&self) -> RecordOwned
Convert to an owned record.
Sourcepub fn to_builder(&self) -> RecordBuilder<'a>
pub fn to_builder(&self) -> RecordBuilder<'a>
Create a builder initialized with the current record’s values.
Sourcepub fn builder() -> RecordBuilder<'a>
pub fn builder() -> RecordBuilder<'a>
Returns a new builder.