pub struct ModuleManager { /* private fields */ }Expand description
Module manager for organizing knowledge bases
Implementations§
Source§impl ModuleManager
impl ModuleManager
Sourcepub fn create_module(&mut self, name: impl Into<String>) -> Result<&mut Module>
pub fn create_module(&mut self, name: impl Into<String>) -> Result<&mut Module>
Create a new module
Sourcepub fn get_module_mut(&mut self, name: &str) -> Result<&mut Module>
pub fn get_module_mut(&mut self, name: &str) -> Result<&mut Module>
Get a module (mutable)
Sourcepub fn get_module(&self, name: &str) -> Result<&Module>
pub fn get_module(&self, name: &str) -> Result<&Module>
Get a module (immutable)
Sourcepub fn delete_module(&mut self, name: &str) -> Result<()>
pub fn delete_module(&mut self, name: &str) -> Result<()>
Delete a module
Sourcepub fn set_focus(&mut self, module_name: impl Into<String>) -> Result<()>
pub fn set_focus(&mut self, module_name: impl Into<String>) -> Result<()>
Set current focus module
Sourcepub fn list_modules(&self) -> Vec<String>
pub fn list_modules(&self) -> Vec<String>
Get all module names
Sourcepub fn export_all_from(
&mut self,
module_name: &str,
export_list: ExportList,
) -> Result<()>
pub fn export_all_from( &mut self, module_name: &str, export_list: ExportList, ) -> Result<()>
Configure exports for a module
Sourcepub fn import_from(
&mut self,
to_module: &str,
from_module: &str,
import_type: ImportType,
pattern: impl Into<String>,
) -> Result<()>
pub fn import_from( &mut self, to_module: &str, from_module: &str, import_type: ImportType, pattern: impl Into<String>, ) -> Result<()>
Add an import to a module
Sourcepub fn is_rule_visible(&self, rule_name: &str, to_module: &str) -> Result<bool>
pub fn is_rule_visible(&self, rule_name: &str, to_module: &str) -> Result<bool>
Check if a rule is visible to a module
Sourcepub fn is_template_visible(
&self,
template_name: &str,
to_module: &str,
) -> Result<bool>
pub fn is_template_visible( &self, template_name: &str, to_module: &str, ) -> Result<bool>
Check if a template is visible to a module
Sourcepub fn get_visible_rules(&self, module_name: &str) -> Result<Vec<String>>
pub fn get_visible_rules(&self, module_name: &str) -> Result<Vec<String>>
Get all rules visible to a module
Sourcepub fn get_stats(&self) -> ModuleStats
pub fn get_stats(&self) -> ModuleStats
Get module statistics
Trait Implementations§
Source§impl Clone for ModuleManager
impl Clone for ModuleManager
Source§fn clone(&self) -> ModuleManager
fn clone(&self) -> ModuleManager
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ModuleManager
impl Debug for ModuleManager
Auto Trait Implementations§
impl Freeze for ModuleManager
impl RefUnwindSafe for ModuleManager
impl Send for ModuleManager
impl Sync for ModuleManager
impl Unpin for ModuleManager
impl UnwindSafe for ModuleManager
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more