pub enum Format {
Json,
Toml,
Yaml,
Dotenv,
Ini,
TomlFrontmatter,
YamlFrontmatter,
}Variants§
Json
Toml
Yaml
Dotenv
Ini
TomlFrontmatter
A +++-fenced TOML frontmatter block; the Markdown body is frozen. Never
auto-detected — selected only via --input-format toml-frontmatter.
YamlFrontmatter
A ----fenced YAML frontmatter block; the Markdown body is frozen. Never
auto-detected — selected only via --input-format yaml-frontmatter.
Implementations§
Source§impl Format
impl Format
Sourcepub const fn name(self) -> &'static str
pub const fn name(self) -> &'static str
Stable human-readable label used in document results and diagnostics.
Sourcepub fn load(&self, content: &str) -> DocumentResult<Value>
pub fn load(&self, content: &str) -> DocumentResult<Value>
Load a config file in the detected format.
Sourcepub fn save(&self, value: &Value) -> DocumentResult<String>
pub fn save(&self, value: &Value) -> DocumentResult<String>
Save a config in the target format.
Sourcepub fn ensure_writable(&self, _operation: &str) -> DocumentResult<()>
pub fn ensure_writable(&self, _operation: &str) -> DocumentResult<()>
Reject mutation before a backend-specific value is changed or written.
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
Mutably borrows from an owned value. Read more
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
Compare self to
key and return true if they are equal.