[][src]Struct igc::util::Time

pub struct Time {
    pub seconds: u8,
    pub minutes: u8,
    pub hours: u8,
}

Represents a specific time of day with second precision.

Does not contain any timezone information as the IGC specification mandates UTC everywhere.

Fields

seconds: u8minutes: u8hours: 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.

Auto Trait Implementations

impl Send for Time

impl Sync for Time

Blanket Implementations

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]