pub trait ConfigFormat: ConfigValue + Sealed {
const FORMAT: Format;
// Required methods
fn parse_document(text: &str) -> Result<Self>;
fn parse_inline(text: String) -> Self;
fn serialize(&self, pretty: bool) -> Result<String>;
}Expand description
Parsing and emission for the two supported native formats.
Sealed to JSON and TOML; structural algorithms use the open
ConfigValue interface. Inline values and whole-string environment
references always share this trait’s typing rule.
Required Associated Constants§
Required Methods§
Sourcefn parse_document(text: &str) -> Result<Self>
fn parse_document(text: &str) -> Result<Self>
Parse a document. Top-level object validation happens in parse.
Sourcefn parse_inline(text: String) -> Self
fn parse_inline(text: String) -> Self
Parse one value, falling back to the original text as a string.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".