1 2 3 4 5 6 7 8 9 10 11 12 13 14
#[derive(Debug)] pub enum Direction { Asc, Desc, } impl ToString for Direction { fn to_string(&self) -> String { match self { Direction::Asc => String::from("asc"), Direction::Desc => String::from("desc"), } } }