Struct vobject::icalendar::ICalendar
[−]
[src]
pub struct ICalendar(_);
An ICalendar representing type
Methods
impl ICalendar
[src]
pub fn build(s: &str) -> Result<ICalendar>
[src]
Parse a string to a ICalendar object
Returns an error if the parsed text is not a ICalendar (that means that an error is returned also if this is a valid Vcard!)
pub fn empty() -> ICalendar
[src]
pub fn add_event(&mut self, builder: EventBuilder)
[src]
Add an event to the calendar
pub fn with_event(self, builder: EventBuilder) -> Self
[src]
Chainable variant of ICalendar::add_event()
.
pub fn from_component(c: Component) -> RResult<ICalendar, Component>
[src]
Wrap a Component into a Vcard object, or don't do it if the Component is not a Vcard.
ⓘImportant traits for EventIterator<'a>pub fn events<'a>(&'a self) -> EventIterator<'a>
[src]
ⓘImportant traits for EventIterator<'a>
Get an iterator over the events in this calendar
The iterator creates Ok(&Event) instances on the fly, or Err(&Component) instances if the item cannot be parsed as an Event, not forgetting any data.
Getting actual objects
For getting a Event-instance iterator from this, one can use this as follows:
icalendar .events() .filter_map(Result::ok) .map(|ev| ev.clone()) .collect::<Vec<Event>>();