pub struct UtcDateTime {
pub year: u32,
pub month: u8,
pub day: u8,
pub hour: u8,
pub minute: u8,
pub second: u8,
pub nanosecond: u32,
}Fields§
§year: u32§month: u8§day: u8§hour: u8§minute: u8§second: u8§nanosecond: u32Implementations§
Source§impl UtcDateTime
impl UtcDateTime
pub fn now() -> Self
Sourcepub unsafe fn from_instant(ts: Instant) -> Self
pub unsafe fn from_instant(ts: Instant) -> Self
Converts a value of Instant into UtcDateTime.
§Safety
If the host adjust its date/time while the guest is running, the result may be way off, so should only be used in non-critical situations such as tests.
pub fn from_unix_nanos(nanos: u128) -> Self
Trait Implementations§
Source§impl Debug for UtcDateTime
impl Debug for UtcDateTime
Auto Trait Implementations§
impl Freeze for UtcDateTime
impl RefUnwindSafe for UtcDateTime
impl Send for UtcDateTime
impl Sync for UtcDateTime
impl Unpin for UtcDateTime
impl UnwindSafe for UtcDateTime
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more