Skip to main content

ical/tree/
mod.rs

1//! # Syntax tree
2//!
3//! Everything syntactic: the byte-faithful representation of a calendar and the
4//! bridges to and from the decoded model.
5//!
6//! The hub is [`cst::IcalCst`], a recursive tree of generic nodes
7//! ([`line`](mod@line), [`param`], [`value`], [`leaf`], with each line's wire
8//! layout on [`wire`]) that round-trips the wire bytes exactly.
9//!
10//! On top of it sit the read-and-edit lenses: one per property in [`prop`],
11//! one per parameter in [`param`], and the in-place edit cursor in [`value`].
12//! A property lens is implemented on the marker its property defines in
13//! [`crate::prop`], so the RFC contract and the syntax projection meet on one
14//! type without the contract needing a parser.
15//!
16//! Around them, [`codec`] projects between tree and decoded model, and the
17//! three-way [`merge`](mod@merge) reconciles two divergent edits against
18//! their common base.
19//!
20//! Parsing is the only fallible step, so its [`error`] type lives here too.
21//! This whole layer is gated behind the `parser` feature, so the decoded
22//! model can be depended on without it.
23
24pub mod codec;
25pub mod cst;
26pub mod error;
27pub mod leaf;
28pub mod line;
29pub mod merge;
30pub mod param;
31pub mod prop;
32pub mod value;
33pub mod wire;