Skip to main content

Module meta

Module meta 

Source
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::Value as a list of link strings, mirroring Value::link_strings for callers that have migrated to reading fig::Value directly 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 format into a Value, serde-free.
serialize_mapping
Serialize a metadata mapping back to a string in format — the same format it was parsed from, so a ```fig block is never rewritten as YAML.
serialize_value
Serialize any metadata value to a string in format. What serialize_mapping is for whole frontmatter blocks, this is for a value plucked out of one (the CLI’s get on a compound field).

Type Aliases§

Mapping
An order-preserving metadata mapping — the shape of a frontmatter block.