pub trait RustFunctionGenerator {
// Required methods
fn push_str(&mut self, s: &str);
fn tmp(&mut self) -> usize;
fn rust_gen(&self) -> &dyn RustGenerator<'_>;
fn lift_lower(&self) -> LiftLower;
// Provided methods
fn let_results(&mut self, amt: usize, results: &mut Vec<String>) { ... }
fn record_lower(
&mut self,
id: TypeId,
record: &Record,
operand: &str,
results: &mut Vec<String>,
) { ... }
fn record_lift(
&mut self,
id: TypeId,
ty: &Record,
operands: &[String],
results: &mut Vec<String>,
) { ... }
fn tuple_lower(
&mut self,
tuple: &Tuple,
operand: &str,
results: &mut Vec<String>,
) { ... }
fn tuple_lift(&mut self, operands: &[String], results: &mut Vec<String>) { ... }
fn typename_lower(&self, id: TypeId) -> String { ... }
fn typename_lift(&self, id: TypeId) -> String { ... }
}Required Methods§
fn push_str(&mut self, s: &str)
fn tmp(&mut self) -> usize
fn rust_gen(&self) -> &dyn RustGenerator<'_>
fn lift_lower(&self) -> LiftLower
Provided Methods§
fn let_results(&mut self, amt: usize, results: &mut Vec<String>)
fn record_lower( &mut self, id: TypeId, record: &Record, operand: &str, results: &mut Vec<String>, )
fn record_lift( &mut self, id: TypeId, ty: &Record, operands: &[String], results: &mut Vec<String>, )
fn tuple_lower( &mut self, tuple: &Tuple, operand: &str, results: &mut Vec<String>, )
fn tuple_lift(&mut self, operands: &[String], results: &mut Vec<String>)
fn typename_lower(&self, id: TypeId) -> String
fn typename_lift(&self, id: TypeId) -> String
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".