[][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();

Methods

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
[src]

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

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

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[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> ToString for T where
    T: Display + ?Sized
[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.