pub trait Compiler:
Sync
+ Send
+ 'static
+ Clone
+ Debug {
type Representation: Display;
type CompilationOptions: Send + Default + Debug;
// Required methods
fn compile(
&mut self,
kernel: KernelDefinition,
compilation_options: &Self::CompilationOptions,
mode: ExecutionMode,
) -> Self::Representation;
fn elem_size(&self, elem: Elem) -> usize;
fn extension(&self) -> &'static str;
}
Expand description
Compiles the representation into its own representation that can be formatted into tokens.
Required Associated Types§
Sourcetype Representation: Display
type Representation: Display
The representation for the compiled code.
type CompilationOptions: Send + Default + Debug
Required Methods§
Sourcefn compile(
&mut self,
kernel: KernelDefinition,
compilation_options: &Self::CompilationOptions,
mode: ExecutionMode,
) -> Self::Representation
fn compile( &mut self, kernel: KernelDefinition, compilation_options: &Self::CompilationOptions, mode: ExecutionMode, ) -> Self::Representation
Compiles the kernel definition into the compiler’s representation.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.