#[non_exhaustive]pub struct Time {
pub hour: u16,
pub min: u16,
pub sec: u16,
pub millis: u16,
}Expand description
A DOS compatible time.
Used by DirEntry time-related methods.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.hour: u16Hours after midnight - [0, 23]
min: u16Minutes after the hour - [0, 59]
sec: u16Seconds after the minute - [0, 59]
millis: u16Milliseconds after the second - [0, 999]
Implementations§
source§impl Time
impl Time
sourcepub fn new(hour: u16, min: u16, sec: u16, millis: u16) -> Self
pub fn new(hour: u16, min: u16, sec: u16, millis: u16) -> Self
Creates a new Time instance.
hour- number of hours after midnight in the range [0, 23]min- number of minutes after the hour in the range [0, 59]sec- number of seconds after the minute in the range [0, 59]millis- number of milliseconds after the second in the range [0, 999]
Panics
Panics if one of provided arguments is out of the supported range.
Trait Implementations§
source§impl PartialEq<Time> for Time
impl PartialEq<Time> for Time
impl Copy for Time
impl Eq for Time
impl StructuralEq for Time
impl StructuralPartialEq for Time
Auto Trait Implementations§
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