#[derive(Debug, Clone, PartialEq)]
pub enum Command {
Terminate,
Flush,
Close,
}
impl std::fmt::Display for Command {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let label = match self {
Command::Flush => "flush",
Command::Terminate => "terminate",
Command::Close => "close",
};
write!(f, "{}", label)
}
}