pub enum TimestampFormat {
None,
UnixSeconds,
Uptime,
Rfc3339,
}Expand description
How (or whether) to render a timestamp at the start of each stdout line.
Journald entries always carry their own native timestamp, so this applies only to the stdout layer.
Variants§
None
No timestamp prefix. Default.
UnixSeconds
Seconds since UNIX_EPOCH, with millisecond
fraction (e.g. 1714867200.123). Free of any external date crate.
Uptime
Seconds since this process started (e.g. 12.345). Useful for tests
and short-lived programs.
Rfc3339
RFC 3339 / ISO 8601 in UTC with millisecond precision and a trailing
Z (e.g. 2026-05-05T14:23:45.123Z). Hand-formatted from
SystemTime; no external date crate.
Default for SystemdLayer::json.
Trait Implementations§
Source§impl Clone for TimestampFormat
impl Clone for TimestampFormat
Source§fn clone(&self) -> TimestampFormat
fn clone(&self) -> TimestampFormat
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 TimestampFormat
impl Debug for TimestampFormat
Source§impl Default for TimestampFormat
impl Default for TimestampFormat
Source§fn default() -> TimestampFormat
fn default() -> TimestampFormat
Returns the “default value” for a type. Read more
Source§impl PartialEq for TimestampFormat
impl PartialEq for TimestampFormat
impl Copy for TimestampFormat
impl Eq for TimestampFormat
impl StructuralPartialEq for TimestampFormat
Auto Trait Implementations§
impl Freeze for TimestampFormat
impl RefUnwindSafe for TimestampFormat
impl Send for TimestampFormat
impl Sync for TimestampFormat
impl Unpin for TimestampFormat
impl UnsafeUnpin for TimestampFormat
impl UnwindSafe for TimestampFormat
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