DMSCHardwareProvider

Trait DMSCHardwareProvider 

Source
pub trait DMSCHardwareProvider: Send + Sync {
    // Required methods
    fn name(&self) -> &str;
    fn categories(&self) -> Vec<HardwareCategory>;
    fn discover<'life0, 'life1, 'async_trait>(
        &'life0 self,
        platform: &'life1 PlatformInfo,
    ) -> Pin<Box<dyn Future<Output = DiscoveryResult<Vec<DMSCDevice>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn priority(&self) -> u32;
    fn is_available(&self, platform: &PlatformInfo) -> bool;
}
Expand description

Trait for hardware discovery providers

Required Methods§

Source

fn name(&self) -> &str

Returns the provider name

Source

fn categories(&self) -> Vec<HardwareCategory>

Returns the hardware categories this provider handles

Source

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

Discovers devices of this type

Source

fn priority(&self) -> u32

Returns the priority of this provider (lower = higher priority)

Source

fn is_available(&self, platform: &PlatformInfo) -> bool

Checks if this provider is available on the current platform

Implementors§