Available on crate features
json or toml or yaml only.Expand description
The input format interface: what a format reads a text into, and how it reads one scalar for the type a field needs.
The built-in formats, YAML with yaml, JSON with json and
TOML with toml, and a format a CLI writes are the same kind of thing:
a Format in a Formats registry. Format::read
turns text into the located tree, and Format::resolve
gives each scalar its meaning, so every format keeps its own scalar rules.
Structs§
- Json
json - JSON by RFC 8259, with no option that loosens it. Its extension is
json. - Mismatch
- A scalar the format cannot read as the type a field wanted.
- Refusal
- Why a
Format::readrefused a text, and where. - Toml
toml - TOML, read by the
tomlcrate. Its extension istoml. - Yaml
yaml - YAML, read by serde-saphyr’s located reader. Its extensions are
yamlandyml.
Enums§
- Fault
- What a read of a text or of a typed value found wrong.
- Raise
- Where a person raises a limit a text went past.
- Reading
- What a
Format::readrefuses besides syntax. - Resolved
- A scalar read for the type a field needs.
- Wanted
- The type a field needs a scalar read as.
Statics§
- JSON
json - The JSON format, for
Formats::add. - TOML
toml - The TOML format, for
Formats::add. - YAML
yaml - The YAML format, for
Formats::add.
Traits§
- Format
- A way to write input, read into the located tree.