DMSCHardwareDiscoveryPlugin

Trait DMSCHardwareDiscoveryPlugin 

Source
pub trait DMSCHardwareDiscoveryPlugin: Send + Sync {
    // Required methods
    fn metadata(&self) -> PluginMetadata;
    fn discover<'life0, 'life1, 'async_trait>(
        &'life0 self,
        platform: &'life1 PlatformInfo,
    ) -> Pin<Box<dyn Future<Output = PluginResult<Vec<DMSCDevice>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn status(&self) -> PluginStatus;

    // Provided methods
    fn initialize<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        config: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = PluginResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
    fn shutdown<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = PluginResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
}
Expand description

Trait for custom hardware discovery plugins

Required Methods§

Source

fn metadata(&self) -> PluginMetadata

Returns the plugin metadata

Source

fn discover<'life0, 'life1, 'async_trait>( &'life0 self, platform: &'life1 PlatformInfo, ) -> Pin<Box<dyn Future<Output = PluginResult<Vec<DMSCDevice>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Discovers hardware devices

Source

fn status(&self) -> PluginStatus

Returns the current plugin status

Provided Methods§

Source

fn initialize<'life0, 'life1, 'async_trait>( &'life0 mut self, config: &'life1 str, ) -> Pin<Box<dyn Future<Output = PluginResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Initializes the plugin with configuration

Source

fn shutdown<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = PluginResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Called when the plugin is being unloaded

Implementors§