pub struct PluginRegistry { /* private fields */ }Expand description
Plugin registry for managing custom discovery plugins
Implementations§
Source§impl PluginRegistry
impl PluginRegistry
Sourcepub async fn register(
&mut self,
plugin: Box<dyn DMSCHardwareDiscoveryPlugin>,
) -> PluginResult<String>
pub async fn register( &mut self, plugin: Box<dyn DMSCHardwareDiscoveryPlugin>, ) -> PluginResult<String>
Registers a new plugin
Sourcepub async fn unregister(&mut self, name: &str) -> PluginResult<()>
pub async fn unregister(&mut self, name: &str) -> PluginResult<()>
Unregisters a plugin
Sourcepub async fn initialize(&self, name: &str, config: &str) -> PluginResult<()>
pub async fn initialize(&self, name: &str, config: &str) -> PluginResult<()>
Initializes a plugin with configuration
Sourcepub async fn discover_with_plugin(
&self,
name: &str,
platform: &PlatformInfo,
) -> PluginResult<Vec<DMSCDevice>>
pub async fn discover_with_plugin( &self, name: &str, platform: &PlatformInfo, ) -> PluginResult<Vec<DMSCDevice>>
Discovers devices using a specific plugin
Sourcepub async fn discover_all(
&self,
platform: &PlatformInfo,
) -> PluginResult<Vec<DMSCDevice>>
pub async fn discover_all( &self, platform: &PlatformInfo, ) -> PluginResult<Vec<DMSCDevice>>
Discovers devices using all enabled plugins
Sourcepub async fn enable(&self, name: &str) -> PluginResult<()>
pub async fn enable(&self, name: &str) -> PluginResult<()>
Enables a plugin
Sourcepub async fn disable(&self, name: &str) -> PluginResult<()>
pub async fn disable(&self, name: &str) -> PluginResult<()>
Disables a plugin
Sourcepub async fn is_enabled(&self, name: &str) -> bool
pub async fn is_enabled(&self, name: &str) -> bool
Checks if a plugin is enabled
Sourcepub async fn registered_plugins(&self) -> Vec<String>
pub async fn registered_plugins(&self) -> Vec<String>
Returns all registered plugin names
Sourcepub async fn enabled_plugins(&self) -> Vec<String>
pub async fn enabled_plugins(&self) -> Vec<String>
Returns all enabled plugin names
Sourcepub async fn plugin_metadata(&self, name: &str) -> Option<PluginMetadata>
pub async fn plugin_metadata(&self, name: &str) -> Option<PluginMetadata>
Returns plugin metadata
Sourcepub async fn enabled_count(&self) -> usize
pub async fn enabled_count(&self) -> usize
Returns the count of enabled plugins
Trait Implementations§
Source§impl Default for PluginRegistry
impl Default for PluginRegistry
Source§fn default() -> PluginRegistry
fn default() -> PluginRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PluginRegistry
impl !RefUnwindSafe for PluginRegistry
impl Send for PluginRegistry
impl Sync for PluginRegistry
impl Unpin for PluginRegistry
impl !UnwindSafe for PluginRegistry
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::RequestSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request