pub trait Backend: BackendTypes + TypeMethods {
type Builder<'a>: Builder<Type = Self::Type, Value = Self::Value, StackSlot = Self::StackSlot, BasicBlock = Self::BasicBlock, Function = Self::Function>
where Self: 'a;
type FuncId: Copy + Eq + Hash + Debug;
Show 17 methods
// Required methods
fn ir_extension(&self) -> &'static str;
fn set_module_name(&mut self, name: &str);
fn set_is_dumping(&mut self, yes: bool);
fn set_debug_assertions(&mut self, yes: bool);
fn opt_level(&self) -> OptimizationLevel;
fn set_opt_level(&mut self, level: OptimizationLevel);
fn dump_ir(&mut self, path: &Path) -> Result<()>;
fn dump_disasm(&mut self, path: &Path) -> Result<()>;
fn is_aot(&self) -> bool;
fn function_name_is_unique(&self, name: &str) -> bool;
fn build_function(
&mut self,
name: &str,
ret: Option<Self::Type>,
params: &[Self::Type],
param_names: &[&str],
linkage: Linkage,
) -> Result<(Self::Builder<'_>, Self::FuncId)>;
fn verify_module(&mut self) -> Result<()>;
fn optimize_module(&mut self) -> Result<()>;
fn write_object<W: Write>(&mut self, w: W) -> Result<()>;
fn jit_function(&mut self, id: Self::FuncId) -> Result<usize>;
unsafe fn free_function(&mut self, id: Self::FuncId) -> Result<()>;
unsafe fn free_all_functions(&mut self) -> Result<()>;
}
Required Associated Types§
type Builder<'a>: Builder<Type = Self::Type, Value = Self::Value, StackSlot = Self::StackSlot, BasicBlock = Self::BasicBlock, Function = Self::Function> where Self: 'a
type FuncId: Copy + Eq + Hash + Debug
Required Methods§
fn ir_extension(&self) -> &'static str
fn set_module_name(&mut self, name: &str)
fn set_is_dumping(&mut self, yes: bool)
fn set_debug_assertions(&mut self, yes: bool)
fn opt_level(&self) -> OptimizationLevel
fn set_opt_level(&mut self, level: OptimizationLevel)
fn dump_ir(&mut self, path: &Path) -> Result<()>
fn dump_disasm(&mut self, path: &Path) -> Result<()>
fn is_aot(&self) -> bool
fn function_name_is_unique(&self, name: &str) -> bool
fn build_function( &mut self, name: &str, ret: Option<Self::Type>, params: &[Self::Type], param_names: &[&str], linkage: Linkage, ) -> Result<(Self::Builder<'_>, Self::FuncId)>
fn verify_module(&mut self) -> Result<()>
fn optimize_module(&mut self) -> Result<()>
fn write_object<W: Write>(&mut self, w: W) -> Result<()>
fn jit_function(&mut self, id: Self::FuncId) -> Result<usize>
unsafe fn free_function(&mut self, id: Self::FuncId) -> Result<()>
unsafe fn free_all_functions(&mut self) -> Result<()>
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.