pub struct ICalendar<'a>(/* private fields */);
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§
Source§impl<'a> ICalendar<'a>
impl<'a> ICalendar<'a>
Sourcepub fn new<V, P>(version: V, prodid: P) -> Self
pub fn new<V, P>(version: V, prodid: P) -> Self
Creates a new iCalendar object/VCALENDAR
calendar component. The
VERSION
and PRODID
properties are required.
Sourcepub fn push<P>(&mut self, property: P)
pub fn push<P>(&mut self, property: P)
Adds a property to the iCalendar object. Calendar properties are like calendar attributes.
Sourcepub fn add_component<C>(&mut self, component: C)
pub fn add_component<C>(&mut self, component: C)
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.