Backend

Trait Backend 

Source
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§

Source

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

Get the backend identifier (e.g., “typst”, “latex”)

Source

fn supported_formats(&self) -> &'static [OutputFormat]

Get supported output formats

Source

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

Get the glue file extension (e.g., “.typ”, “.tex”)

Source

fn register_filters(&self, glue: &mut Glue)

Register backend-specific filters with the glue environment

Source

fn compile( &self, glue_content: &str, quill: &Quill, opts: &RenderOptions, ) -> Result<Vec<Artifact>, RenderError>

Compile the glue content into final artifacts

Implementations on Foreign Types§

Source§

impl Backend for TypstBackend

Source§

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

Source§

fn supported_formats(&self) -> &'static [OutputFormat]

Source§

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

Source§

fn register_filters(&self, glue: &mut Glue)

Source§

fn compile( &self, glued_content: &str, quill: &Quill, opts: &RenderOptions, ) -> Result<Vec<Artifact>, RenderError>

Implementors§