pub trait Backend: Send + Sync {
// Required methods
fn id(&self) -> &'static str;
fn supported_formats(&self) -> &'static [OutputFormat];
fn glue_extension_types(&self) -> &'static [&'static str];
fn allow_auto_glue(&self) -> bool;
fn register_filters(&self, glue: &mut Glue);
fn compile(
&self,
glue_content: &str,
quill: &Quill,
opts: &RenderOptions,
) -> Result<RenderResult, 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 glue_extension_types(&self) -> &'static [&'static str]
fn glue_extension_types(&self) -> &'static [&'static str]
Get the glue file extensions accepted by this backend (e.g., &[“.typ”, “.tex”]) Returns an empty array to disable custom glue files.
Sourcefn allow_auto_glue(&self) -> bool
fn allow_auto_glue(&self) -> bool
Whether this backend allows automatic JSON glue generation
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<RenderResult, RenderError>
fn compile( &self, glue_content: &str, quill: &Quill, opts: &RenderOptions, ) -> Result<RenderResult, RenderError>
Compile the glue content into final artifacts