pub struct Time {
pub hour: u64,
pub minute: u64,
pub second: u64,
pub microsecond: u64,
}Fields§
§hour: u64§minute: u64§second: u64§microsecond: u64Implementations§
Source§impl Time
impl Time
pub fn new(hour: u64, minute: u64, second: u64) -> Self
pub fn new_with_microseconds( hour: u64, minute: u64, second: u64, microseconds: u64, ) -> Self
pub fn valid(&self) -> bool
pub fn to_hh_mm_string(&self) -> String
pub fn from_ms_dos_time(ms_dos_time: u16) -> Self
pub fn from_seconds(seconds: u64) -> Self
pub fn to_seconds(&self) -> u64
pub fn to_minutes(&self) -> u64
pub fn to_microseconds(&self) -> u64
pub fn to_milliseconds(&self) -> u64
pub fn from_minutes(minutes: u64) -> Self
pub fn from_hours(hour: u64) -> Self
pub fn from_duration(duration: Duration) -> Time
pub fn to_duration(&self) -> Duration
pub fn normalize(&self) -> 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 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