[−][src]Struct ics::ICalendar
The iCalendar object specified as VCALENDAR.
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.
Methods
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 Event
component to the iCalendar object.
pub fn add_todo(&mut self, todo: ToDo<'a>)
[src]
Adds a ToDo
component to the iCalendar object.
pub fn add_journal(&mut self, journal: Journal<'a>)
[src]
Adds a Journal
component to the iCalendar object.
pub fn add_freebusy(&mut self, freebusy: FreeBusy<'a>)
[src]
Adds a FreeBusy
component to the iCalendar object.
pub fn add_timezone(&mut self, timezone: TimeZone<'a>)
[src]
Adds a TimeZone
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 inside the file.
Trait Implementations
impl<'a> PartialOrd<ICalendar<'a>> for ICalendar<'a>
[src]
fn partial_cmp(&self, other: &ICalendar<'a>) -> Option<Ordering>
[src]
fn lt(&self, other: &ICalendar<'a>) -> bool
[src]
fn le(&self, other: &ICalendar<'a>) -> bool
[src]
fn gt(&self, other: &ICalendar<'a>) -> bool
[src]
fn ge(&self, other: &ICalendar<'a>) -> bool
[src]
impl<'a> PartialEq<ICalendar<'a>> for ICalendar<'a>
[src]
impl<'a> Ord for ICalendar<'a>
[src]
fn cmp(&self, other: &ICalendar<'a>) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more
fn clamp(self, min: Self, max: Self) -> Self
[src]
clamp
)Restrict a value to a certain interval. Read more
impl<'a> Clone for ICalendar<'a>
[src]
fn clone(&self) -> ICalendar<'a>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<'a> From<ICalendar<'a>> for Component<'a>
[src]
impl<'a> Eq for ICalendar<'a>
[src]
impl<'a> Hash for ICalendar<'a>
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl<'a> Display for ICalendar<'a>
[src]
impl<'a> Debug for ICalendar<'a>
[src]
Auto Trait Implementations
impl<'a> Sync for ICalendar<'a>
impl<'a> Send for ICalendar<'a>
impl<'a> Unpin for ICalendar<'a>
impl<'a> RefUnwindSafe for ICalendar<'a>
impl<'a> UnwindSafe for ICalendar<'a>
Blanket Implementations
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.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T> From<T> for T
[src]
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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,