Expand description
§A library to generate and parse iCalendars.
Contributions are very welcome.
§Structure
Calendar
s consist ofComponent
sComponent
s are e.g.Event
orTodo
Component
s consist ofProperty
sProperty
s may haveParameter
s
let event = Event::new()
.summary("test event")
.description("here I have something really important to do")
.starts(Utc::now())
.class(Class::Confidential)
.ends(Utc::now() + Duration::days(1))
.append_property(Property::new("TEST", "FOOBAR")
.add_parameter("IMPORTANCE", "very")
.add_parameter("DUE", "tomorrow")
.done())
.done();
let bday = Event::new()
.all_day(NaiveDate::from_ymd(2023, 3, 15))
.summary("My Birthday")
.description(
r#"Hey, I'm gonna have a party
BYOB: Bring your own beer.
Hendrik"#
)
.done();
let todo = Todo::new().summary("Buy some milk").done();
let mut calendar = Calendar::new();
calendar.push(event);
calendar.push(todo);
calendar.push(bday);
§Breaking API Changes in version 0.7.0
Todo::due
andTodo::completed
now take their date-time argument by value rather than by referenceTodo::completed
now requires itschrono::DateTime
argument to have exactlychrono::Utc
specified as its time zone as mandated by the RFC.EventLike::starts
,EventLike::ends
andTodo::due
now take newly introducedCalendarDateTime
(throughInto<CalendarDateTime>
indirection). This allows callers to define time zone handling. Conversions fromchrono::NaiveDateTime
andchrono::DateTime<Utc>
are provided for ergonomics, the latter also restoring API compatibility in case of UTC date-times.
Modules§
- Parsing iCalendar document parser
Structs§
- VALARM (RFC 5545, Section 3.6.6 )
- Represents a calendar
- VEVENT (RFC 5545, Section 3.6.1 )
- key-value pairs inside of
Property
s - key-value pairs inside of
Component
s - VVENUE (ical-venue)
Enums§
- Representation of various forms of
DATE-TIME
per RFC 5545, Section 3.3.5 - This property defines the access classification for a calendar component. RFC 5545, Section 3.8.1.3
- Either a
DATE-TIME
or aDATE
. - Encodes the status of an
Event
RFC 5545, Section 3.8.1.11 - Alarm Trigger Relationship RFC 5545, Section 3.2.14
- Encodes the status of a
Todo
RFC 5545, Section 3.8.1.11 - Describes when an alarm is supposed to occure.
- see 8.3.4. Value Data Types Registry
Traits§
- Implemented by everything that goes into a
Calendar