Trait Module
Source pub trait Module<'vm>: Debug + DynClone {
// Required methods
fn name(&self) -> &'static str;
fn trait_definition(&self) -> &'static str;
// Provided methods
fn call(&self, function: &'vm str, args: RigzArgs) -> Result<Value, VMError> { ... }
fn call_extension(
&self,
this: Rc<RefCell<Value>>,
function: &'vm str,
args: RigzArgs,
) -> Result<Value, VMError> { ... }
fn call_mutable_extension(
&self,
this: Rc<RefCell<Value>>,
function: &'vm str,
args: RigzArgs,
) -> Result<Option<Value>, VMError> { ... }
fn vm_extension(
&self,
vm: &mut VM<'vm>,
function: &'vm str,
args: RigzArgs,
) -> Result<Value, VMError> { ... }
}