pub trait SubModule: Module {
// Required methods
fn submodules(&self) -> &Modules;
fn submodules_mut(&mut self) -> &mut Modules;
// Provided methods
fn append_module(&mut self, module: ModulePtr) -> Result<(), LewpError> { ... }
fn render_submodules(&self, parent_module_view: &mut Nodes) { ... }
fn render_submodule(
&self,
idx: usize,
parent_module_view: &mut Nodes,
) -> Result<(), LewpError> { ... }
fn render_submodule_id(
&self,
id: &str,
parent_module_view: &mut Nodes,
) -> Result<(), LewpError> { ... }
fn render_submodule_id_all(
&self,
id: &str,
parent_module_view: &mut Nodes,
) -> Result<(), LewpError> { ... }
fn run_submodules(
&mut self,
runtime_information: Rc<RuntimeInformation>,
) -> Result<(), LewpError> { ... }
fn run_submodule(&mut self, idx: usize) -> Result<(), LewpError> { ... }
fn run_submodule_id(&mut self, id: &str) -> Result<(), LewpError> { ... }
fn run_submodule_id_all(&mut self, id: &str) -> Result<(), LewpError> { ... }
fn component_information(&self) -> Rc<ComponentInformation> { ... }
}
Expand description
Enables management of submodules.
Required Methods§
Sourcefn submodules(&self) -> &Modules
fn submodules(&self) -> &Modules
Returns a reference to the submodules.
Sourcefn submodules_mut(&mut self) -> &mut Modules
fn submodules_mut(&mut self) -> &mut Modules
Returns a mutable reference to the submodules.
Provided Methods§
Sourcefn append_module(&mut self, module: ModulePtr) -> Result<(), LewpError>
fn append_module(&mut self, module: ModulePtr) -> Result<(), LewpError>
Appends the given module as a submodule.
Sourcefn render_submodules(&self, parent_module_view: &mut Nodes)
fn render_submodules(&self, parent_module_view: &mut Nodes)
Renders all submodules to the parent view.
Sourcefn render_submodule(
&self,
idx: usize,
parent_module_view: &mut Nodes,
) -> Result<(), LewpError>
fn render_submodule( &self, idx: usize, parent_module_view: &mut Nodes, ) -> Result<(), LewpError>
Renders the given submodule to the parent view.
Parameters:
idx: The index of the module in Self::submodules.
Sourcefn render_submodule_id(
&self,
id: &str,
parent_module_view: &mut Nodes,
) -> Result<(), LewpError>
fn render_submodule_id( &self, id: &str, parent_module_view: &mut Nodes, ) -> Result<(), LewpError>
Sourcefn render_submodule_id_all(
&self,
id: &str,
parent_module_view: &mut Nodes,
) -> Result<(), LewpError>
fn render_submodule_id_all( &self, id: &str, parent_module_view: &mut Nodes, ) -> Result<(), LewpError>
Renders all submodules with the given id.
Parameters:
id: The unique identifier of the modules to be rendered.
Sourcefn run_submodules(
&mut self,
runtime_information: Rc<RuntimeInformation>,
) -> Result<(), LewpError>
fn run_submodules( &mut self, runtime_information: Rc<RuntimeInformation>, ) -> Result<(), LewpError>
Runs all submodules in order as they are returned in Self::submodules.
Sourcefn run_submodule_id_all(&mut self, id: &str) -> Result<(), LewpError>
fn run_submodule_id_all(&mut self, id: &str) -> Result<(), LewpError>
Runs all submodules with the given id.
Parameters:
id: The unique identifier of the modules to be run.
Sourcefn component_information(&self) -> Rc<ComponentInformation>
fn component_information(&self) -> Rc<ComponentInformation>
Returns the meta information for this submodule.