Skip to main content

GenericSensor

Trait GenericSensor 

Source
pub trait GenericSensor:
    Debug
    + Send
    + Sync
    + Basic {
    // Required methods
    fn check(&self) -> Result<()>;
    fn check_dataset(&self, mode: u8, datasettype: DatasetType) -> Result<()>;

    // Provided methods
    fn enable_8bit_sensor<'life0, 'async_trait>(
        &'life0 self,
        mode: u8,
        delta: u32,
    ) -> Pin<Box<dyn Future<Output = Result<(Receiver<Vec<i8>>, JoinHandle<()>)>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn enable_16bit_sensor<'life0, 'async_trait>(
        &'life0 self,
        mode: u8,
        delta: u32,
    ) -> Pin<Box<dyn Future<Output = Result<(Receiver<Vec<i16>>, JoinHandle<()>)>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn enable_32bit_sensor<'life0, 'async_trait>(
        &'life0 self,
        mode: u8,
        delta: u32,
    ) -> Pin<Box<dyn Future<Output = Result<(Receiver<Vec<i32>>, JoinHandle<()>)>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn raw_channel(&self) -> Result<(Receiver<Vec<i8>>, JoinHandle<()>)> { ... }
}

Required Methods§

Source

fn check(&self) -> Result<()>

Source

fn check_dataset(&self, mode: u8, datasettype: DatasetType) -> Result<()>

Provided Methods§

Source

fn enable_8bit_sensor<'life0, 'async_trait>( &'life0 self, mode: u8, delta: u32, ) -> Pin<Box<dyn Future<Output = Result<(Receiver<Vec<i8>>, JoinHandle<()>)>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn enable_16bit_sensor<'life0, 'async_trait>( &'life0 self, mode: u8, delta: u32, ) -> Pin<Box<dyn Future<Output = Result<(Receiver<Vec<i16>>, JoinHandle<()>)>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn enable_32bit_sensor<'life0, 'async_trait>( &'life0 self, mode: u8, delta: u32, ) -> Pin<Box<dyn Future<Output = Result<(Receiver<Vec<i32>>, JoinHandle<()>)>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn raw_channel(&self) -> Result<(Receiver<Vec<i8>>, JoinHandle<()>)>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§