Trait org_rust_exporter::Exporter

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

Trait for exporter implementations

Exporting backends must implement this trait.

Required Methods§

source

fn export(input: &str) -> Result<String, Error>

Writes the AST generated from the input into a String.

source

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

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) -> Result

Object Safety§

This trait is not object safe.

Implementors§

source§

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

source§

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