Skip to main content

Module annotation

Module annotation 

Source
Expand description

Inline annotations embedded in structured document values.

An object with _ephemeris: "annotated" is a marker carrying value and optional order, string, comment, and dotted fields. order is only valid on object entries and dotted only on objects. Annotated::try_from decodes a [Value] tree once into typed scalars, comments, and object entries already sorted by order, then by key.

Detection is shape-based: an unrelated object that matches the marker shape is consumed as one, and a near-miss with an unknown field is rejected.

Modulesยง

validate ๐Ÿ”’
Checking an annotated tree against the features of a format.

Structsยง

Annotated ๐Ÿ”’
A value decorated with an optional comment.
Decoded ๐Ÿ”’
A decoded value whose marker fields have not been applied yet, so that composed markers can still be merged.
Marker ๐Ÿ”’
The marker fields other than value, which is read borrowed.
Ranked ๐Ÿ”’
A decoded value and the order it requests among its siblings.

Enumsยง

AnnotatedValue ๐Ÿ”’
The shape of an annotated value once markers have been decoded away.
MarkerTag ๐Ÿ”’
StringStyle ๐Ÿ”’
String rendering style requested by an annotation.

Constantsยง

MARKER_KEY ๐Ÿ”’
MARKER_VALUE ๐Ÿ”’

Functionsยง

is_marker ๐Ÿ”’