[][src]Enum icalendar::CalendarDateTime

pub enum CalendarDateTime {
    Floating(NaiveDateTime),
    Utc(DateTime<Utc>),
}

Representation of various forms of DATE-TIME per RFC 5545, Section 3.3.5

Conversions from chrono types are provided in form of From implementations, see documentation of individual variants.

In addition to readily implemented FORM #1 and FORM #2, the RFC also specifies FORM #3: DATE WITH LOCAL TIME AND TIME ZONE REFERENCE. This variant is not yet implemented. Adding it will require adding support for VTIMEZONE and referencing it using TZID.

Variants

Floating(NaiveDateTime)

FORM #1: DATE WITH LOCAL TIME: floating, follows current time-zone of the attendee.

Conversion from chrono::NaiveDateTime results in this variant.

FORM #2: DATE WITH UTC TIME: rendered with Z suffix character.

Conversion from chrono::DateTime<Utc> results in this variant. Use date_time.with_timezone(&Utc) to convert date_time from arbitrary time zone to UTC.

Trait Implementations

impl From<DateTime<Utc>> for CalendarDateTime[src]

Converts from time zone-aware UTC date-time to CalendarDateTime::Utc.

impl From<NaiveDateTime> for CalendarDateTime[src]

Converts from time zone-less date-time to CalendarDateTime::Floating.

impl Clone for CalendarDateTime[src]

impl Copy for CalendarDateTime[src]

impl Display for CalendarDateTime[src]

fn fmt(&self, f: &mut Formatter) -> Result<(), Error>[src]

Format date-time in RFC 5545 compliant manner.

impl Debug for CalendarDateTime[src]

Auto Trait Implementations

Blanket Implementations

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

impl<T> From<T> for 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.

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

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

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

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,