pub struct LogContext {
pub timestamp: UtcDateTime,
}Expand description
Metadata attached to log lines (wall-clock UTC, etc.).
Fields§
§timestamp: UtcDateTimeWall-clock instant in UTC when the log context was created or captured.
Implementations§
Source§impl LogContext
impl LogContext
Sourcepub const fn new(timestamp: UtcDateTime) -> Self
pub const fn new(timestamp: UtcDateTime) -> Self
Build a context with an explicit UTC timestamp.
Sourcepub fn with_now_timestamp() -> Self
pub fn with_now_timestamp() -> Self
Capture the current system time as UTC.
Trait Implementations§
Source§impl Clone for LogContext
impl Clone for LogContext
Source§fn clone(&self) -> LogContext
fn clone(&self) -> LogContext
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 moreSource§impl Debug for LogContext
impl Debug for LogContext
Source§impl PartialEq for LogContext
impl PartialEq for LogContext
impl Copy for LogContext
impl Eq for LogContext
impl StructuralPartialEq for LogContext
Auto Trait Implementations§
impl Freeze for LogContext
impl RefUnwindSafe for LogContext
impl Send for LogContext
impl Sync for LogContext
impl Unpin for LogContext
impl UnsafeUnpin for LogContext
impl UnwindSafe for LogContext
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Equal for T
impl<T> Equal for T
Source§fn effect_equals(&self, other: &Self) -> bool
fn effect_equals(&self, other: &Self) -> bool
Returns whether
self and other are structurally equal (defaults to PartialEq::eq).