Skip to main content

Module yaml

Module yaml 

Source
Expand description

TF-YAML: the strict YAML subset TrustForge parses and emits — in-house codec (see docs/dependency-audit.md), mirror of tools/tf-types-ts/src/core/yaml.ts. Read that file’s doc comment for the full subset definition; the two implementations must stay semantically identical (verified by parsing every .yaml in the repo plus the conformance suites in both languages).

Values parse into serde_json::Value: mapping keys are always strings, integers restrict to the ±2^53-1 safe range (larger digit runs stay strings, matching the TS/JSON number model), and the non-JSON floats .inf/.nan are rejected.

Deliberately rejected (out of subset): anchors & aliases, tags, multi-document streams, complex (? ) keys.

Structs§

YamlError

Functions§

from_str
Parse TF-YAML directly into a typed struct.
parse
Parse TF-YAML into a JSON value tree.
to_string
Serialize a value as block-style TF-YAML.