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,
iface: &Interface,
id: TypeId,
record: &Record,
operand: &str,
results: &mut Vec<String>
) { ... }
fn record_lift(
&mut self,
iface: &Interface,
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, iface: &Interface, id: TypeId) -> String { ... }
fn typename_lift(&self, iface: &Interface, id: TypeId) -> String { ... }
}