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§
sourcefn export(input: &str) -> Result<String, Error>
fn export(input: &str) -> Result<String, Error>
Writes the AST generated from the input into a String
.
sourcefn export_buf<'inp, T: Write>(input: &'inp str, buf: &'buf mut T) -> Result
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
.
fn export_tree<T: Write>(parsed: &Parser<'_>, buf: &'buf mut T) -> Result
Object Safety§
This trait is not object safe.