pub struct ModuleExportRegistry { /* private fields */ }Expand description
Registry of all extension modules.
Created at startup and populated from loaded plugin capabilities.
Lookup is by canonical path only (e.g. "std::core::json").
Implementations§
Source§impl ModuleExportRegistry
impl ModuleExportRegistry
Sourcepub fn register(&mut self, module: ModuleExports)
pub fn register(&mut self, module: ModuleExports)
Register a extension module.
Sourcepub fn get(&self, name: &str) -> Option<&ModuleExports>
pub fn get(&self, name: &str) -> Option<&ModuleExports>
Get a module by canonical name.
Sourcepub fn module_names(&self) -> Vec<&str>
pub fn module_names(&self) -> Vec<&str>
List all registered module names.
Sourcepub fn modules(&self) -> &HashMap<String, ModuleExports>
pub fn modules(&self) -> &HashMap<String, ModuleExports>
Get all registered modules.
Trait Implementations§
Source§impl Debug for ModuleExportRegistry
impl Debug for ModuleExportRegistry
Auto Trait Implementations§
impl !RefUnwindSafe for ModuleExportRegistry
impl !UnwindSafe for ModuleExportRegistry
impl Freeze for ModuleExportRegistry
impl Send for ModuleExportRegistry
impl Sync for ModuleExportRegistry
impl Unpin for ModuleExportRegistry
impl UnsafeUnpin for ModuleExportRegistry
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