Expand description
Embedded-metadata values — a dynamic, order-preserving value tree over fig.
This is prov’s common currency: link fields are configurable, so the
metadata is accessed dynamically rather than through a fixed struct. The
parse/serialize paths are serde-free — they walk fig’s native value tree —
mirroring the proven approach in diaryx_core’s yaml module.
The functions here are format-parametric: the caller passes the
fig::Format the block is written in, resolved from the detected embed
archetype via fig::EmbedType::inner_format (see document). Which
formats are compiled in is governed by prov’s forwarded fig feature
gates (yaml, json, fig).
Enums§
- Value
- A dynamic metadata value. Integers and floats are kept distinct, and mappings preserve key order (frontmatter is order-significant to humans).
Functions§
- link_
strings - Interpret a
fig::Valueas a list of link strings, mirroringValue::link_stringsfor callers that have migrated to readingfig::Valuedirectly at the accessor boundary. A bare string yields one element, a sequence yields its string-shaped elements, anything else yields nothing. - parse_
mapping - Parse a metadata mapping (the shape of frontmatter) in
format. An empty document is an empty mapping; a non-mapping top level is an error. - parse_
value - Parse a metadata document in
formatinto aValue, serde-free. - serialize_
mapping - Serialize a metadata mapping back to a string in
format— the same format it was parsed from, so a```figblock is never rewritten as YAML. - serialize_
value - Serialize any metadata value to a string in
format. Whatserialize_mappingis for whole frontmatter blocks, this is for a value plucked out of one (the CLI’sgeton a compound field).
Type Aliases§
- Mapping
- An order-preserving metadata mapping — the shape of a frontmatter block.