pub trait DocumentReader: Send + Sync {
// Required methods
fn id(&self) -> FormatId;
fn read<'a>(&self, src: &'a Source, ctx: &ReadContext) -> Result<Events<'a>>;
// Provided method
fn capabilities(&self) -> ReaderCaps { ... }
}Expand description
Turns bytes into the internal model. This is what the original design called a “Renderer”: it produces the document, it does not paint it.
Required Methods§
Provided Methods§
fn capabilities(&self) -> ReaderCaps
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".