trait DeviceImpl: Send {
    // Required methods
    fn set_led_data<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        led_data: &'life1 [Color]
    ) -> Pin<Box<dyn Future<Output = Result<(), DeviceError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn update<'life0, 'async_trait>(
        &'life0 mut self
    ) -> Pin<Box<dyn Future<Output = Result<(), DeviceError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

source

fn set_led_data<'life0, 'life1, 'async_trait>( &'life0 mut self, led_data: &'life1 [Color] ) -> Pin<Box<dyn Future<Output = Result<(), DeviceError>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Set the device implementation’s view of the LED data to the given values

Panics

Implementations are allowed to panic if led_data.len() != hardware_led_count. The Device wrapper is responsible for ensuring the given slice is the right size.

source

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

Update the device implementation’s temporal data. For devices that require regular rewrites (regardless of actual changes in the LED data), this should return a future that performs the required work.

Implementors§