pub trait Backend: Send + Sync {
// Required methods
fn id(&self) -> &'static str;
fn supported_formats(&self) -> &'static [OutputFormat];
fn glue_type(&self) -> &'static str;
fn register_filters(&self, glue: &mut Glue);
fn compile(
&self,
glue_content: &str,
quill: &Quill,
opts: &RenderOptions,
) -> Result<Vec<Artifact>, RenderError>;
}Expand description
Backend trait for rendering different output formats
Required Methods§
Sourcefn supported_formats(&self) -> &'static [OutputFormat]
fn supported_formats(&self) -> &'static [OutputFormat]
Get supported output formats
Sourcefn register_filters(&self, glue: &mut Glue)
fn register_filters(&self, glue: &mut Glue)
Register backend-specific filters with the glue environment
Sourcefn compile(
&self,
glue_content: &str,
quill: &Quill,
opts: &RenderOptions,
) -> Result<Vec<Artifact>, RenderError>
fn compile( &self, glue_content: &str, quill: &Quill, opts: &RenderOptions, ) -> Result<Vec<Artifact>, RenderError>
Compile the glue content into final artifacts