pub struct UnixTimestamp(pub u64);Expand description
Simplifies handling unix timestamp dates. Use only with UTC dates as it does not take time zones into account. Eliminates the need to use the chrono library.
use forensic_rs::prelude::*;
assert_eq!("01-01-1970 00:00:00", format!("{:?}", UnixTimestamp(0)));
assert_eq!("01-01-1972 00:00:00", format!("{:?}", UnixTimestamp(63072000000)));Tuple Fields§
§0: u64Trait Implementations§
Source§impl Clone for UnixTimestamp
impl Clone for UnixTimestamp
Source§fn clone(&self) -> UnixTimestamp
fn clone(&self) -> UnixTimestamp
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 UnixTimestamp
impl Debug for UnixTimestamp
Source§impl Default for UnixTimestamp
impl Default for UnixTimestamp
Source§fn default() -> UnixTimestamp
fn default() -> UnixTimestamp
Returns the “default value” for a type. Read more
Source§impl From<u64> for UnixTimestamp
impl From<u64> for UnixTimestamp
impl Copy for UnixTimestamp
Auto Trait Implementations§
impl Freeze for UnixTimestamp
impl RefUnwindSafe for UnixTimestamp
impl Send for UnixTimestamp
impl Sync for UnixTimestamp
impl Unpin for UnixTimestamp
impl UnwindSafe for UnixTimestamp
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