pub struct ICalendar(_);
Expand description

An ICalendar representing type

Implementations§

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!)

Add an event to the calendar

Chainable variant of ICalendar::add_event().

Wrap a Component into a Vcard object, or don’t do it if the Component is not a Vcard.

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>>();

Trait Implementations§

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.