yazi/yazi-shared/src/layer.rs
2023-11-28 02:21:36 +08:00

29 lines
616 B
Rust

use std::fmt::{self, Display};
#[derive(Debug, Default, PartialEq, Eq, Hash, Clone, Copy)]
pub enum Layer {
#[default]
App,
Manager,
Tasks,
Select,
Input,
Help,
Completion,
Which,
}
impl Display for Layer {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
Self::App => write!(f, "app"),
Self::Manager => write!(f, "manager"),
Self::Tasks => write!(f, "tasks"),
Self::Select => write!(f, "select"),
Self::Input => write!(f, "input"),
Self::Help => write!(f, "help"),
Self::Completion => write!(f, "completion"),
Self::Which => write!(f, "which"),
}
}
}