pub trait Compiler: Send + Sync {
// Required methods
fn input(&self) -> TreeKind;
fn extension(&self) -> &'static str;
fn compile(&self, tree: &Tree<'_>, file: &mut File) -> Result<String, Error>;
// Provided method
fn html_target(&self) -> Option<HtmlTarget> { ... }
}Expand description
Turns a tree into output text, whose kind extension names (html, md).
Required Methods§
fn input(&self) -> TreeKind
fn extension(&self) -> &'static str
fn compile(&self, tree: &Tree<'_>, file: &mut File) -> Result<String, Error>
Provided Methods§
Sourcefn html_target(&self) -> Option<HtmlTarget>
fn html_target(&self) -> Option<HtmlTarget>
What a stage before this compiler must match to write its HTML in its place.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".