#[derive(Clone)] pub struct RGB { pub red: u8, pub green: u8, pub blue: u8 } impl IntoIterator for RGB { type Item = u8; type IntoIter = std::array::IntoIter; fn into_iter(self) -> Self::IntoIter { IntoIterator::into_iter([self.red, self.green, self.blue]) } }