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§
sourcefn compile(&self, ctx: Context) -> CompilerReturn
fn compile(&self, ctx: Context) -> CompilerReturn
compile
method, which takes Context
as parameter
and return CompilerReturn
, is required to implement.