pub struct Time {
pub hour: u8,
pub minute: u8,
pub second: u8,
pub nanosecond: u32,
}Expand description
Time of day in nanoseconds since midnight.
Fields§
§hour: u8§minute: u8§second: u8§nanosecond: u32Implementations§
Source§impl Time
impl Time
pub fn from_hms_nano( hour: u8, minute: u8, second: u8, nanosecond: u32, ) -> Result<Self, TimeError>
Sourcepub fn seconds_since_midnight(self) -> u32
pub fn seconds_since_midnight(self) -> u32
Total seconds since midnight (ignores nanoseconds).
Sourcepub fn nanos_since_midnight(self) -> u64
pub fn nanos_since_midnight(self) -> u64
Total nanoseconds since midnight.
Trait Implementations§
Source§impl Ord for Time
impl Ord for Time
Source§impl PartialOrd for Time
impl PartialOrd for Time
impl Copy for Time
impl Eq for Time
impl StructuralPartialEq for Time
Auto Trait Implementations§
impl Freeze for Time
impl RefUnwindSafe for Time
impl Send for Time
impl Sync for Time
impl Unpin for Time
impl UnwindSafe for Time
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