#[non_exhaustive]pub enum Format {
Json,
Jsonc,
Json5,
Yaml,
Toml,
Zon,
Fig,
}Expand description
A config format. Every variant parses, edits, and serializes.
Every variant is always present in the enum, but each format is gated by a
crate feature of the same name (json, yaml, toml, zon, fig).
json, yaml, toml, and fig are on by default; zon is opt-in.
Disabling a feature compiles that format out of the bundled native library,
so selecting it then fails with Error::UnsupportedFormat at runtime.
Json/Jsonc/Json5 share one core behind the json feature. (The core
also has a reader-only XML format, but it has no writable Format variant
and so is not exposed here.)
#[non_exhaustive]: the core gains formats over time, so a match needs a
_ arm. Constructing a variant is unaffected.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Json
Jsonc
Json5
Yaml
Toml
Zon
Fig
The native fig authoring dialect (see src/languages/fig/DESIGN.md
in the core repo) — a memorable, typeable surface over the same AST.