This PR redesigns the conversion of CharStr from and to text formats.
It distinguishes between three text formats: quoted and unquoted representation format (i.e., what’s used in zonefiles) and a serialization format which is an unquoted format with only backslash and non-printable octets escaped. The latter will be used in serialization but also by default for Display. This makes it reversible with the FromStr implementation but avoids escaping white space. Methods for explicitly displaying in quoted and unquoted representation format are provided.
Serialization works mostly as before but uses the serialization format rather than the unquoted representation format in human-readable formats. It still uses the raw octets in binary formats.
The PR adds proper documentation for all of it to the type.
This PR redesigns the conversion of
CharStr
from and to text formats.It distinguishes between three text formats: quoted and unquoted representation format (i.e., what’s used in zonefiles) and a serialization format which is an unquoted format with only backslash and non-printable octets escaped. The latter will be used in serialization but also by default for
Display
. This makes it reversible with theFromStr
implementation but avoids escaping white space. Methods for explicitly displaying in quoted and unquoted representation format are provided.Serialization works mostly as before but uses the serialization format rather than the unquoted representation format in human-readable formats. It still uses the raw octets in binary formats.
The PR adds proper documentation for all of it to the type.
This is a breaking change.