pub struct ModuleRegistry { /* private fields */ }Expand description
Module registry for managing module lifecycle
Implementations§
Source§impl ModuleRegistry
impl ModuleRegistry
Sourcepub fn discover_modules(&mut self) -> Result<Vec<ModuleInfo>>
pub fn discover_modules(&mut self) -> Result<Vec<ModuleInfo>>
Discover available modules in the modules directory
Sourcepub fn get_module(
&self,
name: &str,
version: Option<&str>,
) -> Result<ModuleInfo>
pub fn get_module( &self, name: &str, version: Option<&str>, ) -> Result<ModuleInfo>
Get module by name and optional version
Sourcepub fn install_module(&mut self, source: ModuleSource) -> Result<ModuleInfo>
pub fn install_module(&mut self, source: ModuleSource) -> Result<ModuleInfo>
Install module from source
Sourcepub fn update_module(
&mut self,
name: &str,
new_version: Option<&str>,
) -> Result<ModuleInfo>
pub fn update_module( &mut self, name: &str, new_version: Option<&str>, ) -> Result<ModuleInfo>
Update module to new version (re-pull from git if from git, else re-download from registry)
Sourcepub fn remove_module(&mut self, name: &str) -> Result<()>
pub fn remove_module(&mut self, name: &str) -> Result<()>
Remove module from disk.
Callers with a running node should stop the module first via ModuleLifecycle::stop_module.
Sourcepub fn list_modules(&self) -> Vec<ModuleInfo>
pub fn list_modules(&self) -> Vec<ModuleInfo>
List all installed modules
Sourcepub fn resolve_dependencies(
&self,
module_names: &[String],
) -> Result<Vec<ModuleInfo>>
pub fn resolve_dependencies( &self, module_names: &[String], ) -> Result<Vec<ModuleInfo>>
Resolve dependencies for a set of modules
Auto Trait Implementations§
impl Freeze for ModuleRegistry
impl RefUnwindSafe for ModuleRegistry
impl Send for ModuleRegistry
impl Sync for ModuleRegistry
impl Unpin for ModuleRegistry
impl UnsafeUnpin for ModuleRegistry
impl UnwindSafe for ModuleRegistry
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
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>
Converts
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>
Converts
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