pub struct TmFields {
pub tm_sec: i32,
pub tm_min: i32,
pub tm_hour: i32,
pub tm_mday: i32,
pub tm_mon: i32,
pub tm_year: i32,
pub tm_wday: i32,
pub tm_yday: i32,
pub tm_isdst: i32,
}Expand description
Local mirror of C’s struct tm.
Field conventions follow the C standard: tm_year is years since 1900,
tm_mon ∈ [0, 11], tm_wday ∈ [0, 6] (Sunday = 0), tm_isdst is −1 when
DST status is unknown.
TODO(port): In Phase B, replace with the libc::tm type (via the libc crate)
or an equivalent from chrono / time. Conversion from / to Unix timestamps
is not implemented in Phase A — stubs that need a broken-down time use
TmFields::default() (all zeros).
Fields§
§tm_sec: i32§tm_min: i32§tm_hour: i32§tm_mday: i32§tm_mon: i32§tm_year: i32§tm_wday: i32§tm_yday: i32§tm_isdst: i32Trait Implementations§
Auto Trait Implementations§
impl Freeze for TmFields
impl RefUnwindSafe for TmFields
impl Send for TmFields
impl Sync for TmFields
impl Unpin for TmFields
impl UnsafeUnpin for TmFields
impl UnwindSafe for TmFields
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