pub struct ModuleDiscovery { /* private fields */ }Expand description
Module discovery service.
Implementations§
Source§impl ModuleDiscovery
impl ModuleDiscovery
Sourcepub fn new(config: DiscoveryConfig) -> Self
pub fn new(config: DiscoveryConfig) -> Self
Creates a new discovery service.
Sourcepub fn with_defaults() -> Self
pub fn with_defaults() -> Self
Creates a discovery service with default configuration.
Sourcepub fn scan(&self) -> Vec<ModuleFile>
pub fn scan(&self) -> Vec<ModuleFile>
Scans configured directories for modules.
Sourcepub fn register(&self, file: ModuleFile)
pub fn register(&self, file: ModuleFile)
Registers a discovered module.
Sourcepub fn update_status(&self, name: &str, status: ModuleStatus)
pub fn update_status(&self, name: &str, status: ModuleStatus)
Updates module status.
Sourcepub fn record_failure(&self, name: &str, error: String)
pub fn record_failure(&self, name: &str, error: String)
Records a load failure.
Sourcepub fn discovered_modules(&self) -> Vec<DiscoveredModule>
pub fn discovered_modules(&self) -> Vec<DiscoveredModule>
Returns discovered modules.
Sourcepub fn modules_by_status(&self, status: ModuleStatus) -> Vec<DiscoveredModule>
pub fn modules_by_status(&self, status: ModuleStatus) -> Vec<DiscoveredModule>
Returns modules by status.
Sourcepub fn is_running(&self) -> bool
pub fn is_running(&self) -> bool
Returns whether discovery is running.
Sourcepub fn total_discoveries(&self) -> u64
pub fn total_discoveries(&self) -> u64
Returns total discoveries.
Trait Implementations§
Source§impl Debug for ModuleDiscovery
impl Debug for ModuleDiscovery
Auto Trait Implementations§
impl !Freeze for ModuleDiscovery
impl !RefUnwindSafe for ModuleDiscovery
impl Send for ModuleDiscovery
impl Sync for ModuleDiscovery
impl Unpin for ModuleDiscovery
impl UnsafeUnpin for ModuleDiscovery
impl UnwindSafe for ModuleDiscovery
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