Skip to main content

Module encode

Module encode 

Source
Available on crate feature parser only.
Expand description

§Encode (model to syntax)

The write side of the structural bridge: project the decoded model onto a raw syntax tree. A value’s Codec impl encodes it into a IcalValueNode, a IcalParam encodes into a IcalParamNode, a IcalProp encodes into a IcalLine, a IcalComponent encodes into a nested IcalCst, and a Ical encodes into the whole VCALENDAR IcalCst (recursively). The whole calendar is encoded for its version’s Escaper, which the value codecs use to escape every leaf. Display for Ical renders a decoded calendar straight to its serialized bytes through here.