1 2 3 4 5 6 7 8 9 10 11 12 13 14
#[derive(Debug, Clone, Copy, PartialEq)] pub enum Orientation { Horizontal, Vertical, } impl Orientation { pub fn as_str(&self) -> &'static str { match self { Self::Horizontal => "horizontal", Self::Vertical => "vertical", } } }