Expand description
A library for creating ICalendar files.
The library supports the ICalendar specification (RFC 5545) version 2.0.
To use this library add the library as a dependency in your Cargo.toml
:
[dependencies]
ics = "0.1"
By default some features are enabled for speeding up some processes. If you
wish to disable them because you do not want any additional dependencies
except for the standard library, specify in your Cargo.toml
:
[dependencies.ics]
version = "0.1"
default-features = false
Example
use ics::properties::{Comment, Summary};
use ics::{ICalendar, ToDo};
// The ICalendar object is what is later written to the file.
let mut calendar = ICalendar::new("2.0", "ics-rs");
// Anthing that can be converted to a Cow<str> is accepted as value which means
// &str and String can be used freely. For the sake of demonstrating the UID
// was taken from somewhere. Out of security reasons the UID shall be randomly
// generated from another crate.
let mut todo = ToDo::new("d4092ed9-1667-4518-a7c0-bcfaac4f1fc6", "20181021T190000");
todo.push(Summary::new("Katarina's Birthday Present"));
todo.push(Comment::new("Buy her the Imagine Dragons tickets."));
calendar.add_todo(todo);
// write `calendar` to a file
Modules
Basic components for building custom calendar objects.
In the RFC 5545 specified parameters except for IANA and non-standard
parameters (“X”-prefix parameters).
In the RFC 5545 specified properties except for IANA and non-standard
properties (“X”-prefix parameters).
Macros
Macro to create several parameters at once.
Structs
The “VALARM” calendar component, a sub-component for “VEVENT” and “VTODO”.
The “VEVENT” calendar component.
The “VFREEBUSY” calendar component.
The iCalendar object specified as “VCALENDAR”.
The “VJOURNAL” calendar component.
The “VTIMEZONE” calendar component.
The “VTODO” calendar component.
The “STRANDARD” or “DAYLIGHT” sub-component of “VTIMEZONE”.
Functions
Escapes comma, semicolon and backlash character with a backlash.