1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
use iced_core::Color; pub trait StyleSheet { type Style: Default + Copy; fn appearance(&self, style: Self::Style) -> Appearance; } #[derive(Debug, Clone, Copy)] pub struct Appearance { pub color: Option<Color>, } impl Default for Appearance { fn default() -> Self { Self { color: None } } }