Skip to main content

ExportPlugin

Trait ExportPlugin 

Source
pub trait ExportPlugin {
    // Required methods
    fn name(&self) -> &str;
    fn render(
        &self,
        entries: &[Entry],
        options: &RenderOptions,
        config: &Config,
    ) -> String;
    fn settings(&self) -> ExportPluginSettings;
}
Expand description

The interface that export format plugins must implement.

Each plugin provides a trigger pattern used to match --output FORMAT values, settings for configuration, and a render method that formats entries into a string.

Required Methods§

Source

fn name(&self) -> &str

Return the canonical name of this export format.

Source

fn render( &self, entries: &[Entry], options: &RenderOptions, config: &Config, ) -> String

Render the given entries into the plugin’s output format.

Source

fn settings(&self) -> ExportPluginSettings

Return the plugin’s settings including trigger pattern and optional templates.

Implementors§