Available on crate features
json or toml or yaml only.Expand description
The located tree every format reads a text into.
A node keeps the bytes of the text it was written in, so a problem found later, in any format, is placed from the tree alone. A scalar keeps its processed value and the style it was written in, and a mapping keeps its key nodes beside its value nodes, in the order written.
A format that expands aliases while it reads builds no alias node: a node
it replays keeps the span of the node it copies, and
Node::used_at holds where the alias was written.
Every type is read-only and non-exhaustive, so a format outside this crate
builds nodes through Node::scalar, Node::sequence,
Node::mapping, Scalar::new and Tag::new, and a later release
can add a field.
Structs§
- Node
- One node of a text: its bytes, the alias that replayed it, its tag and what it holds.
- Scalar
- A scalar’s processed value and how it was written.
- Tag
- The tag written on a node, in the spelling of serde-saphyr’s
Tagged:!overridefor a local tag, and the resolved handle and suffix otherwise, such astag:yaml.org,2002:strfor!!str.
Enums§
- Node
Kind - What a
Nodeholds. - Scalar
Style - How a scalar is written.
- Scalar
Syntax - The type a format’s syntax gave a scalar, for a format that types a value by how it is written, such as TOML and JSON.