pub struct LogMetadata { /* private fields */ }
Expand description
A structure representing log metadata.
Implementations§
Source§impl LogMetadata
A structure representing metadata for a log entry.
impl LogMetadata
A structure representing metadata for a log entry.
§Fields
timestamp
: The timestamp when the log entry was created.level
: The severity level of the log entry.file
: The file where the log entry was generated.module
: The module where the log entry was generated.line
: The line number in the file where the log entry was generated.message
: The log message.
§Methods
new
: Creates a newLogMetadata
instance.level
: Returns the severity level of the log entry.module
: Returns the module where the log entry was generated.message
: Returns the log message.file
: Returns the file where the log entry was generated.line
: Returns the line number in the file where the log entry was generated.timestamp
: Returns the timestamp when the log entry was created.
Sourcepub fn new(
timestamp: impl Into<String>,
level: LogLevel,
file: impl Into<String>,
module: impl Into<String>,
line: u32,
message: impl Into<String>,
) -> Self
pub fn new( timestamp: impl Into<String>, level: LogLevel, file: impl Into<String>, module: impl Into<String>, line: u32, message: impl Into<String>, ) -> Self
Creates a new LogMetadata
instance with the given values.
Trait Implementations§
Source§impl Clone for LogMetadata
impl Clone for LogMetadata
Source§fn clone(&self) -> LogMetadata
fn clone(&self) -> LogMetadata
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for LogMetadata
impl RefUnwindSafe for LogMetadata
impl Send for LogMetadata
impl Sync for LogMetadata
impl Unpin for LogMetadata
impl UnwindSafe for LogMetadata
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