pub struct UnixTimestampFormatter { /* private fields */ }Expand description
Unix Timestamp format.
The first part (before the decimal point) is the number of seconds since 1970-01-01 00:00 UTC.
The second part is the number of nanoseconds since the last whole second.
Example:
1752817859.157970496Template:
dtin the template would be the datetime string, similar to the above.mod_path,fn_name,level, andmessageall come out of theLogEntryprovided to theformat()method.
ⓘ
format!("{dt} |{mod_path}->{fn_name}| [{level:7}] {message}");Sample output:
1752818461.051538870 |flogging->main| [SEVERE ] Hurricanes are windy!Implementations§
Trait Implementations§
Source§impl Clone for UnixTimestampFormatter
impl Clone for UnixTimestampFormatter
Source§fn clone(&self) -> UnixTimestampFormatter
fn clone(&self) -> UnixTimestampFormatter
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 UnixTimestampFormatter
impl Debug for UnixTimestampFormatter
Source§impl Default for UnixTimestampFormatter
impl Default for UnixTimestampFormatter
Source§impl Display for UnixTimestampFormatter
impl Display for UnixTimestampFormatter
Source§impl FormatTrait for UnixTimestampFormatter
impl FormatTrait for UnixTimestampFormatter
Source§impl Hash for UnixTimestampFormatter
impl Hash for UnixTimestampFormatter
Source§impl PartialEq for UnixTimestampFormatter
impl PartialEq for UnixTimestampFormatter
impl Eq for UnixTimestampFormatter
impl StructuralPartialEq for UnixTimestampFormatter
Auto Trait Implementations§
impl Freeze for UnixTimestampFormatter
impl RefUnwindSafe for UnixTimestampFormatter
impl Send for UnixTimestampFormatter
impl Sync for UnixTimestampFormatter
impl Unpin for UnixTimestampFormatter
impl UnwindSafe for UnixTimestampFormatter
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