#![no_std] pub mod gamma; pub mod rgb; use core::borrow::Borrow; pub trait Lights { type Pixel; fn render(&mut self, pixel: &Self::Pixel); fn latch(&mut self); } pub trait PixelIterator { fn render_to(&mut self, lights: &mut T); } impl PixelIterator for I where I::Item: Borrow { #[inline] fn render_to(&mut self, lights: &mut T) { self.for_each(|pixel| lights.render(pixel.borrow())); } }