[][src]Struct dia_time::Time

pub struct Time { /* fields omitted */ }

Time

Notes

  • Leap years are calculated by Gregorian calendar.
  • Range of days: [1..31].
  • Range of hours: [0..23].
  • Range of minutes, seconds: [0..59].
  • Range of GMT offsets: [-12:00..+14:00] (in seconds).

Methods

impl Time[src]

pub fn make(
    year: i64,
    month: Month,
    day: u8,
    hour: u8,
    minute: u8,
    second: u8,
    gmt_offset: Option<i32>
) -> CrateResult<Self>
[src]

pub const fn year(&self) -> i64[src]

pub const fn month(&self) -> Month[src]

pub const fn day(&self) -> u8[src]

pub const fn hour(&self) -> u8[src]

pub const fn minute(&self) -> u8[src]

pub const fn second(&self) -> u8[src]

pub const fn gmt_offset(&self) -> Option<i32>[src]

pub fn make_utc() -> CrateResult<Self>[src]

pub fn try_into_utc(&self) -> CrateResult<Self>[src]

pub fn is_utc(&self) -> bool[src]

pub fn make_local() -> CrateResult<Self>[src]

pub fn try_into_local(&self) -> CrateResult<Self>[src]

Trait Implementations

impl Clone for Time[src]

impl Debug for Time[src]

impl Eq for Time[src]

impl Hash for Time[src]

impl Ord for Time[src]

impl PartialEq<Time> for Time[src]

impl PartialOrd<Time> for Time[src]

impl StructuralEq for Time[src]

impl<'_> TryFrom<&'_ Duration> for Time[src]

type Error = Error

The type returned in the event of a conversion error.

impl<'_> TryFrom<&'_ Time> for Duration[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Duration> for Time[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Time> for Duration[src]

type Error = Error

The type returned in the event of a conversion error.

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

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

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

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

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

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.