pub trait Compiler: Send + Sync {
    // Required method
    fn compile(&self, ctx: Context) -> CompilerReturn;

    // Provided method
    fn get(self) -> Arc<Self>
       where Self: Sized { ... }
}
Expand description

Compiler trait

All compiler must implement this trait.

Required Methods§

source

fn compile(&self, ctx: Context) -> CompilerReturn

compile method, which takes Context as parameter and return CompilerReturn, is required to implement.

Provided Methods§

source

fn get(self) -> Arc<Self>
where Self: Sized,

get method is provided to get Arc pointer.

Implementors§