pub struct ReadableSystemTime(pub SystemTime);
Expand description
Helper struct for providing a consistent, readable SystemTime
.
This displays a SystemTime
in a human-readable date+time in UTC plus the raw [seconds].[ns]
since epoch of the SystemTime.
§Example
use omaha_client::time::ReadableSystemTime;
use std::time::{Duration, SystemTime};
let sys_time = SystemTime::UNIX_EPOCH + Duration::from_nanos(994610096026420000);
assert_eq!(
format!("{}", ReadableSystemTime(sys_time)),
"2001-07-08 16:34:56.026 UTC (994610096.026420000)"
);
Tuple Fields§
§0: SystemTime
Trait Implementations§
Source§impl Debug for ReadableSystemTime
impl Debug for ReadableSystemTime
Auto Trait Implementations§
impl Freeze for ReadableSystemTime
impl RefUnwindSafe for ReadableSystemTime
impl Send for ReadableSystemTime
impl Sync for ReadableSystemTime
impl Unpin for ReadableSystemTime
impl UnwindSafe for ReadableSystemTime
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