Exporter

Trait Exporter 

Source
pub trait Exporter<'buf> {
    // Required methods
    fn export(
        input: &str,
        conf: ConfigOptions,
    ) -> Result<String, Vec<ExportError>>;
    fn export_buf<'inp, T: Write>(
        input: &'inp str,
        buf: &'buf mut T,
        conf: ConfigOptions,
    ) -> Result<(), Vec<ExportError>>;
    fn export_tree<T: Write>(
        parsed: &Parser<'_>,
        buf: &'buf mut T,
        conf: ConfigOptions,
    ) -> Result<(), Vec<ExportError>>;
}
Expand description

Trait for exporter implementations

Exporting backends must implement this trait.

Required Methods§

Source

fn export(input: &str, conf: ConfigOptions) -> Result<String, Vec<ExportError>>

Writes the AST generated from the input into a String.

Source

fn export_buf<'inp, T: Write>( input: &'inp str, buf: &'buf mut T, conf: ConfigOptions, ) -> Result<(), Vec<ExportError>>

Writes the AST generated from the input into a buffer that implements Write.

Source

fn export_tree<T: Write>( parsed: &Parser<'_>, buf: &'buf mut T, conf: ConfigOptions, ) -> Result<(), Vec<ExportError>>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<'buf> Exporter<'buf> for Html<'buf>

Source§

impl<'buf> Exporter<'buf> for Org<'buf>