fn module(
        &mut self,
        instance_name: Option<String>,
        module: ModuleBinary,
    ) -> Result<(), ActionError> {
        let instance = self.instantiate(module).map_err(ActionError::Setup)?;
        let index = self
            .namespace
            .instance(instance_name.as_ref().map(String::as_str), instance);
        self.current = Some(index);
        Ok(())
    }
/// Define a module and register it.
Define a module and register it.
Define a module and register it .
fn module(
        &mut self,
        instance_name: Option<String>,
        module: ModuleBinary,
    ) -> Result<(), ActionError> {
        let instance = self.instantiate(module).map_err(ActionError::Setup)?;
        let index = self
            .namespace
            .instance(instance_name.as_ref().map(String::as_str), instance);
        self.current = Some(index);
        Ok(())
    }
fn module ( & mut self , instance_name : Option < String > , module : ModuleBinary , ) -> Result < ( ) , ActionError > { let instance = self . instantiate ( module ) . map_err ( ActionError :: Setup ) ? ; let index = self . namespace . instance ( instance_name . as_ref ( ) . map ( String :: as_str ) , instance ) ; self . current = Some ( index ) ; Ok ( ( ) ) }
Define a module and register it.
Define a module and register it .
&mut self
instance_name
Option<String>
module
ModuleBinary