22 lines
483 B
Rust
22 lines
483 B
Rust
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
|
|
pub enum TreePart {
|
|
/// `├──`
|
|
First,
|
|
/// `│ `
|
|
Wait,
|
|
/// `└──`
|
|
Last,
|
|
/// (blank)
|
|
Blank
|
|
}
|
|
impl TreePart {
|
|
/// convert to ascii art
|
|
pub const fn display(self) -> &'static str {
|
|
match self {
|
|
Self::First => "├── ",
|
|
Self::Wait => "│ ",
|
|
Self::Last => "└── ",
|
|
Self::Blank => " ",
|
|
}
|
|
}
|
|
} |