[][src]Struct muon_rs::DateTime

pub struct DateTime { /* fields omitted */ }

Date and time with offset

Formatted and validated as RFC 3339 date-time.

use muon_rs::DateTime;
let datetime = "2019-08-07T16:35:21.363-06:00".parse::<DateTime>().unwrap();
let date = datetime.date();
let time = datetime.time();
let offset = datetime.time_offset();


impl DateTime[src]

pub fn date(&self) -> Date[src]

Get the date

pub fn time(&self) -> Time[src]

Get the time

pub fn time_offset(&self) -> TimeOffset[src]

Get the time offset

Trait Implementations

impl Clone for DateTime[src]

impl Copy for DateTime[src]

impl Debug for DateTime[src]

impl<'de> Deserialize<'de> for DateTime[src]

impl Display for DateTime[src]

impl FromStr for DateTime[src]

type Err = ParseError

The associated error which can be returned from parsing.

impl PartialEq<DateTime> for DateTime[src]

impl Serialize for DateTime[src]

impl StructuralPartialEq for DateTime[src]

Auto Trait Implementations

Blanket Implementations

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

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 

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

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

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

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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

The type returned in the event of a conversion error.