pub type DummyDevice = Rewriter<DummyDeviceImpl>;

Aliased Type§

struct DummyDevice {
    inner: DummyDeviceImpl,
    config: Dummy,
    last_write_time: Option<Instant>,
    next_write_time: Option<Instant>,
}

Fields§

§inner: DummyDeviceImpl§config: Dummy§last_write_time: Option<Instant>§next_write_time: Option<Instant>

Implementations§

source§

impl<D: WritingDevice> Rewriter<D>

source

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

source

async fn write(&mut self) -> Result<(), DeviceError>

source

async fn latching_write(&mut self) -> Result<(), DeviceError>

Trait Implementations§

source§

impl<D: WritingDevice> DeviceImpl for Rewriter<D>

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 Read more
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.