pub struct Time {
pub hour: u8,
pub minute: u8,
pub second: u8,
}Expand description
A simple time of a day.
Fields§
§hour: u8Hour of the day [0-23].
minute: u8Minute of the hour [0-59].
second: u8Second of the minute [0-60].
A value of 60 might occur on a leap second.
Implementations§
Source§impl Time
impl Time
Sourcepub fn new(hour: u8, minute: u8, second: u8) -> Self
pub fn new(hour: u8, minute: u8, second: u8) -> Self
Create a new Time from hours, minutes and seconds.
No checks will be performed to validate the time.
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 UnsafeUnpin 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