[][src]Enum delharc::TimestampResult

pub enum TimestampResult {
    None,
    Naive(NaiveDateTime),
    Utc(DateTime<Utc>),
}

The type returned when parsing last modified timestamp.

Variants

None

The timestamp could not be parsed.

The timestamp value lacks the information about the time zone.

The timestamp value in the UTC time zone.

Implementations

impl TimestampResult[src]

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

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

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

pub fn to_naive_utc(&self) -> Option<NaiveDateTime>[src]

Returns a Naive date and time variant as is or Utc variant as naive date time in the UTC time zone.

pub fn to_naive_local(&self) -> Option<NaiveDateTime>[src]

Returns a Naive date and time variant as is or Utc variant as naive date time in the Local time zone.

pub fn to_utc(&self) -> Option<DateTime<Utc>>[src]

Returns a date time in the UTC time zone.

In this instance the Naive date and time variant is assumed to be in the UTC time zone.

pub fn to_local(&self) -> Option<DateTime<Local>>[src]

Returns a date time in the Local time zone.

In this instance the Naive date and time variant is assumed to be in the Local time zone.

Trait Implementations

impl Clone for TimestampResult[src]

impl Debug for TimestampResult[src]

impl Display for TimestampResult[src]

impl Eq for TimestampResult[src]

impl<T: TimeZone> From<DateTime<T>> for TimestampResult[src]

impl<T: TimeZone> From<LocalResult<DateTime<T>>> for TimestampResult[src]

impl From<NaiveDateTime> for TimestampResult[src]

impl From<Option<NaiveDateTime>> for TimestampResult[src]

impl PartialEq<TimestampResult> for TimestampResult[src]

impl StructuralEq for TimestampResult[src]

impl StructuralPartialEq for TimestampResult[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> 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.