[−][src]Enum icalendar::CalendarDateTime
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.
fn from(dt: NaiveDateTime) -> Self
[src]
impl Clone for CalendarDateTime
[src]
fn clone(&self) -> CalendarDateTime
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[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
impl Send for CalendarDateTime
impl Sync for CalendarDateTime
impl Unpin for CalendarDateTime
impl UnwindSafe for CalendarDateTime
impl RefUnwindSafe for CalendarDateTime
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,