1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
use std::fmt::{Display, Formatter}; pub enum InputType { Test, Real, } impl Display for InputType { fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { f.write_str(match self { InputType::Test => "test", InputType::Real => "real", }) } }