pub struct ICalendar<'a>(_);
Expand description
The iCalendar object specified as VCALENDAR
component
An ICalendar
consists of calendar properties and one or more calendar
components. Properties are attributes that apply to the calendar object as a
whole. (see RFC5545 3.4 iCalendar Object)
The ICalendar struct can be thought of as the iCalendar object. This is
where the specified components are added. To save the object as file, it
needs to be written to a file.
Implementations
sourceimpl<'a> ICalendar<'a>
impl<'a> ICalendar<'a>
sourcepub fn new<V, P>(version: V, prodid: P) -> Selfwhere
V: Into<Cow<'a, str>>,
P: Into<Cow<'a, str>>,
pub fn new<V, P>(version: V, prodid: P) -> Selfwhere
V: Into<Cow<'a, str>>,
P: Into<Cow<'a, str>>,
Creates a new iCalendar object/VCALENDAR
calendar component. The
VERSION
and PRODID
properties are required.
sourcepub fn push<P>(&mut self, property: P)where
P: Into<Property<'a>>,
pub fn push<P>(&mut self, property: P)where
P: Into<Property<'a>>,
Adds a property to the iCalendar object. Calendar properties are like calendar attributes.
sourcepub fn add_component<C>(&mut self, component: C)where
C: Into<Component<'a>>,
pub fn add_component<C>(&mut self, component: C)where
C: Into<Component<'a>>,
Adds a Component
to the iCalendar object. This should be only used
for IANA/non-standard components.
sourcepub fn add_event(&mut self, event: Event<'a>)
pub fn add_event(&mut self, event: Event<'a>)
Adds an VEVENT
component to the iCalendar object.
sourcepub fn add_journal(&mut self, journal: Journal<'a>)
pub fn add_journal(&mut self, journal: Journal<'a>)
Adds a VJOURNAL
component to the iCalendar object.
sourcepub fn add_freebusy(&mut self, freebusy: FreeBusy<'a>)
pub fn add_freebusy(&mut self, freebusy: FreeBusy<'a>)
Adds a VFREEBUSY
component to the iCalendar object.
sourcepub fn add_timezone(&mut self, timezone: TimeZone<'a>)
pub fn add_timezone(&mut self, timezone: TimeZone<'a>)
Adds a VTIMEZONE
component to the iCalendar object.
Trait Implementations
sourceimpl<'a> Ord for ICalendar<'a>
impl<'a> Ord for ICalendar<'a>
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
sourceimpl<'a> PartialEq<ICalendar<'a>> for ICalendar<'a>
impl<'a> PartialEq<ICalendar<'a>> for ICalendar<'a>
sourceimpl<'a> PartialOrd<ICalendar<'a>> for ICalendar<'a>
impl<'a> PartialOrd<ICalendar<'a>> for ICalendar<'a>
sourcefn partial_cmp(&self, other: &ICalendar<'a>) -> Option<Ordering>
fn partial_cmp(&self, other: &ICalendar<'a>) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more