pub trait RgbDriver: 'static {
type Error: Error;
// Required method
async fn write<I: IntoIterator<Item = LedRgb<u8>>>(
&mut self,
pixels: I,
) -> Result<(), Self::Error>;
}
Expand description
Driver for controlling the RGB leds.
Basically, this is just async version trait of blinksy::driver::Driver
. But color is
limited to LinearSrgb to avoid complexity.
TODO: When blinksy implements async drivers, remove this trait and use the blinksy one
directly.
Required Associated Types§
Required Methods§
async fn write<I: IntoIterator<Item = LedRgb<u8>>>( &mut self, pixels: I, ) -> Result<(), Self::Error>
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.