pub trait Reader:
Debug
+ Send
+ Sync {
// Required methods
fn name(&self) -> &str;
fn reads(&self, format: Format) -> bool;
fn parse(&self, text: &str, format: Format) -> Result<Value, Error>;
}Expand description
Text in, this crate’s tree out.
Implement it to read a format this crate does not ship, or to read one it does with a parser of your own.
§Errors
A reader’s error must never carry document content. The line that failed to parse is, on a bad day, the line holding the password — so a message says where it stopped and why, and never what it found there.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".