pub trait OutputHandler {
// Required methods
fn write_r_code(
&mut self,
filename: &str,
content: &str,
) -> Result<(), OutputError>;
fn write_type_annotations(
&mut self,
filename: &str,
content: &str,
) -> Result<(), OutputError>;
fn write_generic_functions(
&mut self,
filename: &str,
content: &str,
) -> Result<(), OutputError>;
}Expand description
Handles output from transpilation.
This trait allows customizing where transpiled R code goes - to files, memory buffers, or anywhere else.
Required Methods§
Sourcefn write_r_code(
&mut self,
filename: &str,
content: &str,
) -> Result<(), OutputError>
fn write_r_code( &mut self, filename: &str, content: &str, ) -> Result<(), OutputError>
Write transpiled R code
Sourcefn write_type_annotations(
&mut self,
filename: &str,
content: &str,
) -> Result<(), OutputError>
fn write_type_annotations( &mut self, filename: &str, content: &str, ) -> Result<(), OutputError>
Write type annotations
Sourcefn write_generic_functions(
&mut self,
filename: &str,
content: &str,
) -> Result<(), OutputError>
fn write_generic_functions( &mut self, filename: &str, content: &str, ) -> Result<(), OutputError>
Write generic function declarations