[−][src]Struct ics::ICalendar
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]
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.
pub fn push<P>(&mut self, property: P) where
P: Into<Property<'a>>,
[src]
P: Into<Property<'a>>,
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]
C: Into<Component<'a>>,
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]
W: Write,
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]
P: AsRef<Path>,
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]
pub fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<'a> Ord for ICalendar<'a>
[src]
pub fn cmp(&self, other: &ICalendar<'a>) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl<'a> PartialEq<ICalendar<'a>> for ICalendar<'a>
[src]
pub fn eq(&self, other: &ICalendar<'a>) -> bool
[src]
pub fn ne(&self, other: &ICalendar<'a>) -> bool
[src]
impl<'a> PartialOrd<ICalendar<'a>> for ICalendar<'a>
[src]
pub fn partial_cmp(&self, other: &ICalendar<'a>) -> Option<Ordering>
[src]
pub fn lt(&self, other: &ICalendar<'a>) -> bool
[src]
pub fn le(&self, other: &ICalendar<'a>) -> bool
[src]
pub fn gt(&self, other: &ICalendar<'a>) -> bool
[src]
pub fn ge(&self, other: &ICalendar<'a>) -> bool
[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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,