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: SystemTimeTrait 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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more