Module
PuduLangDocgen.Yaml
YAML read into metadata and metadata written as YAML
Functions
| Name | Description |
|---|---|
decode |
YAML text decoded as metadata. Block scalars are read here, keeping blank lines and working inside list items, and sequences written at their parent key's indentation are indented, two layouts the standard decoder loses. |
encode |
Metadata written as YAML, keys in their order; nested values indent by two spaces. |
scalar |
A YAML scalar, quoted when plain text would be read differently. Quoting prefers a form without escape sequences, which every YAML reader agrees on. |
decode
fn decode(source: Str) -> Result[Docgen.Meta, Str]
YAML text decoded as metadata. Block scalars are read here, keeping blank lines and working inside list items, and sequences written at their parent key's indentation are indented, two layouts the standard decoder loses.
Parameters
sourceStr
Returns
Result[Docgen.Meta, Str]
encode
fn encode(value: &Docgen.Meta) -> Str
Metadata written as YAML, keys in their order; nested values indent by two spaces.
Parameters
value&Docgen.Meta
Returns
Str
scalar
fn scalar(written: Str) -> Str
A YAML scalar, quoted when plain text would be read differently. Quoting prefers a form without escape sequences, which every YAML reader agrees on.
Parameters
writtenStr
Returns
Str