Skip to main content

OutputHandler

Trait OutputHandler 

Source
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§

Source

fn write_r_code( &mut self, filename: &str, content: &str, ) -> Result<(), OutputError>

Write transpiled R code

Source

fn write_type_annotations( &mut self, filename: &str, content: &str, ) -> Result<(), OutputError>

Write type annotations

Source

fn write_generic_functions( &mut self, filename: &str, content: &str, ) -> Result<(), OutputError>

Write generic function declarations

Implementors§