Expand description

Parsing iCalendar document parser

I would have loved to provide a zero-copy parser here however the Internet Calendaring and Scheduling Core Object Specification (iCalendar) allows, nay demands special line folding

Lines of text SHOULD NOT be longer than 75 octets, excluding the line break. Long content lines SHOULD be split into a multiple line representations using a line “folding” technique. – rfc5545 3.1

For this reason parsing iCal is a bit indirect. In this module you find the following functions to parser iCalendar document. unfold() will unfold the iCal content and turn it into the nice machine-readable format it ought to be. read_calendar() returns a Vector of Components read_calendar_verbose() does the same thing but produces nicer parsing errors with line numbers (referencing the normalized content).

You don’t have to use normalize() on your document if your calandar does not obey the folding rules specified in rfc5545 3.1. If it unexpectedly does, the errors might be a tad confusing.

A Calendar is always a tree of Components. It may contain multiple root elements so we have a Vec<Component> and each Component may more child Components. Each Component has properties, so a Vec of Property and those have of Parameters.

Structs

Helpertype for reserialization

The parsing equivalent of crate::components::Component

Functions

Parse iCalendar file content into an array of Components

Parse iCalendar file content into an array of Components

Parse iCalendar file content into an array of Components

Normalize content lines.