[][src]Struct ics::ICalendar

pub struct ICalendar<'a>(_);

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

impl<'a> ICalendar<'a>[src]

pub fn new<V, P>(version: V, prodid: P) -> Self where
    V: Into<Cow<'a, str>>,
    P: Into<Cow<'a, str>>, 
[src]

Creates a new iCalendar object/VCALENDAR calendar component. The VERSION and PRODID properties are required.

pub fn push<P>(&mut self, property: P) where
    P: Into<Property<'a>>, 
[src]

Adds a property to the iCalendar object. Calendar properties are like calendar attributes.

pub fn add_component<C>(&mut self, component: C) where
    C: Into<Component<'a>>, 
[src]

Adds a Component to the iCalendar object. This should be only used for IANA/non-standard components.

pub fn add_event(&mut self, event: Event<'a>)[src]

Adds an VEVENT component to the iCalendar object.

pub fn add_todo(&mut self, todo: ToDo<'a>)[src]

Adds a VTODO component to the iCalendar object.

pub fn add_journal(&mut self, journal: Journal<'a>)[src]

Adds a VJOURNAL component to the iCalendar object.

pub fn add_freebusy(&mut self, freebusy: FreeBusy<'a>)[src]

Adds a VFREEBUSY component to the iCalendar object.

pub fn add_timezone(&mut self, timezone: TimeZone<'a>)[src]

Adds a VTIMEZONE component to the iCalendar object.

pub fn write<W>(&self, writer: W) -> Result<()> where
    W: Write
[src]

Generic convenience method to write the content of the iCalendar object to a writer in the iCalendar format.

pub fn save_file<P>(&self, filename: P) -> Result<()> where
    P: AsRef<Path>, 
[src]

Creates a file from the path and saves the content of the iCalendar object in the iCalendar format.

Trait Implementations

impl<'a> Clone for ICalendar<'a>[src]

impl<'a> Debug for ICalendar<'a>[src]

impl<'a> Display for ICalendar<'a>[src]

impl<'a> Eq for ICalendar<'a>[src]

impl<'a> From<ICalendar<'a>> for Component<'a>[src]

impl<'a> Hash for ICalendar<'a>[src]

impl<'a> Ord for ICalendar<'a>[src]

impl<'a> PartialEq<ICalendar<'a>> for ICalendar<'a>[src]

impl<'a> PartialOrd<ICalendar<'a>> for ICalendar<'a>[src]

impl<'a> StructuralEq for ICalendar<'a>[src]

impl<'a> StructuralPartialEq for ICalendar<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for ICalendar<'a>

impl<'a> Send for ICalendar<'a>

impl<'a> Sync for ICalendar<'a>

impl<'a> Unpin for ICalendar<'a>

impl<'a> UnwindSafe for ICalendar<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.