WritingDevice

Trait WritingDevice 

Source
pub trait WritingDevice: Send + Sized {
    type Config: DeviceConfig;

    // Required methods
    fn new(config: &Self::Config) -> Result<Self, DeviceError>;
    fn set_let_data<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 mut self,
        config: &'life1 Self::Config,
        led_data: &'life2 [Color],
    ) -> Pin<Box<dyn Future<Output = Result<(), DeviceError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn write<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = Result<(), DeviceError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Associated Types§

Required Methods§

Source

fn new(config: &Self::Config) -> Result<Self, DeviceError>

Source

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

Source

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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§