[−][src]Struct igc::util::Time
Represents a specific time of day with second precision.
Does not contain any timezone information as the IGC specification mandates UTC everywhere.
Fields
seconds: u8
minutes: u8
hours: u8
Methods
impl Time
[src]
pub fn parse(time_string: &str) -> Result<Self, ParseError>
[src]
Parse a time string of the form "HHMMSS"
pub fn from_hms(hours: u8, minutes: u8, seconds: u8) -> Time
[src]
Helper method to create a Time from a (hour, minute, second) triplet.
pub fn seconds_since_midnight(&self) -> u32
[src]
Helper method to get the seconds since midnight.
Trait Implementations
impl Eq for Time
[src]
impl PartialEq<Time> for Time
[src]
impl Debug for Time
[src]
impl Display for Time
[src]
impl FromStr for Time
[src]
type Err = ParseError
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Self, ParseError>
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,