automata/ical/emitter

RFC 5545 iCalendar emitter. Renders a validated Calendar back to the wire format, applying §3.1 line folding at the 75-octet UTF-8 boundary, §3.3.11 TEXT escaping, and CRLF line endings.

Values

pub fn encode(cal: validator.Calendar) -> String

Encode a Calendar as an RFC 5545 wire-format string. Each emitted line is at most 75 UTF-8 octets and is terminated by CRLF; lines that would exceed the limit are folded onto a continuation line beginning with a single space.

pub fn escape_text(s: String) -> String

Escape a TEXT property value per RFC 5545 §3.3.11.

pub fn fold_line(line: String) -> List(String)

Fold a single logical line into one or more physical lines, each at most 75 UTF-8 octets, with continuation lines prefixed by a single space. The returned list never contains CRLF — callers glue lines together themselves.

Search Document