torin/values/
direction.rs1#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2#[derive(PartialEq, Eq, Clone, Debug, Default, Copy)]
3pub enum Direction {
4 #[default]
6 Vertical,
7 Horizontal,
8}
9
10impl Direction {
11 pub fn vertical() -> Direction {
13 Direction::Vertical
14 }
15
16 pub fn horizontal() -> Direction {
18 Direction::Horizontal
19 }
20
21 pub fn pretty(&self) -> String {
22 match self {
23 Self::Horizontal => "horizontal".to_string(),
24 Self::Vertical => "vertical".to_string(),
25 }
26 }
27}