#[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.
Trait Implementations§
impl Copy for Format
impl Eq for Format
impl StructuralPartialEq for Format
Auto Trait Implementations§
impl Freeze for Format
impl RefUnwindSafe for Format
impl Send for Format
impl Sync for Format
impl Unpin for Format
impl UnsafeUnpin for Format
impl UnwindSafe for Format
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.