Skip to main content

Compiler

Trait Compiler 

Source
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>;
}
Expand description

Turns a tree into output text, whose kind extension names (html, md).

Required Methods§

Source

fn input(&self) -> TreeKind

Source

fn extension(&self) -> &'static str

Source

fn compile(&self, tree: &Tree<'_>, file: &mut File) -> Result<String, Error>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§