pub struct ModuleTable { /* private fields */ }Expand description
Module table (from module.c module hash table)
Implementations§
Source§impl ModuleTable
impl ModuleTable
pub fn new() -> Self
Sourcepub fn load_module(&mut self, name: &str) -> bool
pub fn load_module(&mut self, name: &str) -> bool
Load a module (from module.c load_module)
Sourcepub fn unload_module(&mut self, name: &str) -> bool
pub fn unload_module(&mut self, name: &str) -> bool
Unload a module (from module.c unload_module)
Sourcepub fn list_loaded(&self) -> Vec<&str>
pub fn list_loaded(&self) -> Vec<&str>
List all loaded modules
Sourcepub fn list_all(&self) -> Vec<(&str, &ModuleState)>
pub fn list_all(&self) -> Vec<(&str, &ModuleState)>
List all modules (including unloaded)
Sourcepub fn addbuiltin(&mut self, name: &str, module: &str)
pub fn addbuiltin(&mut self, name: &str, module: &str)
Register a builtin (from module.c addbuiltin)
Sourcepub fn deletebuiltin(&mut self, name: &str, module: &str)
pub fn deletebuiltin(&mut self, name: &str, module: &str)
Unregister a builtin (from module.c deletebuiltin)
Sourcepub fn add_autobin(&mut self, name: &str, module: &str)
pub fn add_autobin(&mut self, name: &str, module: &str)
Register autoloading builtin (from module.c add_autobin)
Sourcepub fn del_autobin(&mut self, name: &str)
pub fn del_autobin(&mut self, name: &str)
Remove autoloading builtin (from module.c del_autobin)
Sourcepub fn setbuiltins(&mut self, module: &str, names: &[&str])
pub fn setbuiltins(&mut self, module: &str, names: &[&str])
Set builtins en masse (from module.c setbuiltins/addbuiltins)
Sourcepub fn addconddef(&mut self, name: &str, module: &str)
pub fn addconddef(&mut self, name: &str, module: &str)
Register a condition (from module.c addconddef)
Sourcepub fn deleteconddef(&mut self, name: &str, module: &str)
pub fn deleteconddef(&mut self, name: &str, module: &str)
Unregister a condition (from module.c deleteconddef)
Sourcepub fn getconddef(&self, name: &str) -> Option<&str>
pub fn getconddef(&self, name: &str) -> Option<&str>
Get condition definition (from module.c getconddef)
Sourcepub fn add_autocond(&mut self, name: &str, module: &str)
pub fn add_autocond(&mut self, name: &str, module: &str)
Register autoloading condition (from module.c add_autocond)
Sourcepub fn del_autocond(&mut self, name: &str)
pub fn del_autocond(&mut self, name: &str)
Remove autoloading condition (from module.c del_autocond)
Sourcepub fn addhookdef(&mut self, name: &str)
pub fn addhookdef(&mut self, name: &str)
Register a hook (from module.c addhookdef)
Sourcepub fn addhookdefs(&mut self, names: &[&str])
pub fn addhookdefs(&mut self, names: &[&str])
Register multiple hooks (from module.c addhookdefs)
Sourcepub fn deletehookdef(&mut self, name: &str)
pub fn deletehookdef(&mut self, name: &str)
Unregister a hook (from module.c deletehookdef)
Sourcepub fn deletehookdefs(&mut self, names: &[&str])
pub fn deletehookdefs(&mut self, names: &[&str])
Unregister multiple hooks (from module.c deletehookdefs)
Sourcepub fn addhookfunc(&mut self, hook: &str, func: &str)
pub fn addhookfunc(&mut self, hook: &str, func: &str)
Add function to hook (from module.c addhookdeffunc/addhookfunc)
Sourcepub fn deletehookfunc(&mut self, hook: &str, func: &str)
pub fn deletehookfunc(&mut self, hook: &str, func: &str)
Remove function from hook (from module.c deletehookdeffunc/deletehookfunc)
Sourcepub fn gethookdef(&self, name: &str) -> Option<&Vec<String>>
pub fn gethookdef(&self, name: &str) -> Option<&Vec<String>>
Get hook definition (from module.c gethookdef)
Sourcepub fn runhookdef(&self, name: &str) -> Vec<String>
pub fn runhookdef(&self, name: &str) -> Vec<String>
Run hook functions (from module.c runhookdef)
Sourcepub fn addparamdef(&mut self, name: &str, module: &str)
pub fn addparamdef(&mut self, name: &str, module: &str)
Register a parameter from module (from module.c addparamdef/checkaddparam)
Sourcepub fn deleteparamdef(&mut self, name: &str, module: &str)
pub fn deleteparamdef(&mut self, name: &str, module: &str)
Unregister a parameter (from module.c deleteparamdef)
Sourcepub fn setparamdefs(&mut self, module: &str, names: &[&str])
pub fn setparamdefs(&mut self, module: &str, names: &[&str])
Set parameters en masse (from module.c setparamdefs)
Sourcepub fn add_autoparam(&mut self, name: &str, module: &str)
pub fn add_autoparam(&mut self, name: &str, module: &str)
Register autoloading parameter (from module.c add_autoparam)
Sourcepub fn del_autoparam(&mut self, name: &str)
pub fn del_autoparam(&mut self, name: &str)
Remove autoloading parameter (from module.c del_autoparam)
Sourcepub fn addwrapper(&mut self, name: &str, flags: u32, module: &str)
pub fn addwrapper(&mut self, name: &str, flags: u32, module: &str)
Add wrapper (from module.c addwrapper)
Sourcepub fn deletewrapper(&mut self, module: &str, name: &str)
pub fn deletewrapper(&mut self, module: &str, name: &str)
Remove wrapper (from module.c deletewrapper)
Sourcepub fn enable_feature(&mut self, module: &str, name: &str) -> bool
pub fn enable_feature(&mut self, module: &str, name: &str) -> bool
Enable a feature (from module.c enables_)
Sourcepub fn disable_feature(&mut self, module: &str, name: &str) -> bool
pub fn disable_feature(&mut self, module: &str, name: &str) -> bool
Disable a feature
Sourcepub fn list_features(&self, module: &str) -> Vec<&ModuleFeature>
pub fn list_features(&self, module: &str) -> Vec<&ModuleFeature>
List features of a module (from module.c features_)
Sourcepub fn module_linked(&self, name: &str) -> bool
pub fn module_linked(&self, name: &str) -> bool
Check if a module is linked (statically compiled) (from module.c module_linked)
Sourcepub fn resolve_autoload_builtin(&self, name: &str) -> Option<&str>
pub fn resolve_autoload_builtin(&self, name: &str) -> Option<&str>
Resolve autoload — find which module provides a builtin
Sourcepub fn resolve_autoload_param(&self, name: &str) -> Option<&str>
pub fn resolve_autoload_param(&self, name: &str) -> Option<&str>
Resolve autoload — find which module provides a parameter
Sourcepub fn ensurefeature(&mut self, module: &str, feature: &str) -> bool
pub fn ensurefeature(&mut self, module: &str, feature: &str) -> bool
Ensure a module’s feature is available
Trait Implementations§
Source§impl Debug for ModuleTable
impl Debug for ModuleTable
Source§impl Default for ModuleTable
impl Default for ModuleTable
Source§fn default() -> ModuleTable
fn default() -> ModuleTable
Auto Trait Implementations§
impl Freeze for ModuleTable
impl RefUnwindSafe for ModuleTable
impl Send for ModuleTable
impl Sync for ModuleTable
impl Unpin for ModuleTable
impl UnsafeUnpin for ModuleTable
impl UnwindSafe for ModuleTable
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more