Skip to main content

Backend

Trait Backend 

Source
pub trait Backend:
    Send
    + Sync
    + Debug {
    // Required methods
    fn id(&self) -> &'static str;
    fn supported_formats(&self) -> &'static [OutputFormat];
    fn open(
        &self,
        plate_content: &str,
        source: &QuillSource,
        json_data: &Value,
    ) -> Result<RenderSession, 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 open( &self, plate_content: &str, source: &QuillSource, json_data: &Value, ) -> Result<RenderSession, RenderError>

Open an iterative render session from plate + compiled JSON data.

Implementations on Foreign Types§

Source§

impl Backend for TypstBackend

Source§

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

Source§

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

Source§

fn open( &self, plate_content: &str, source: &QuillSource, json_data: &Value, ) -> Result<RenderSession, RenderError>

Implementors§