Skip to main content

CodeGenerator

Trait CodeGenerator 

Source
pub trait CodeGenerator {
    type IR;
    type Output;

    // Required method
    fn generate(&mut self, node: Self::IR) -> Self::Output;
}

Required Associated Types§

Required Methods§

Source

fn generate(&mut self, node: Self::IR) -> Self::Output

generate will take optimized ir node and output desired code format, either String or Binary code

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§