use core::fmt::{self, Display};
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum FormatVersion {
Reserved,
One,
Zero,
}
impl FormatVersion {
#[must_use]
pub const fn as_str(self) -> &'static str {
match self {
Self::Reserved => "Reserved",
Self::One => "1",
Self::Zero => "0",
}
}
}
impl Display for FormatVersion {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
self.as_str().fmt(f)
}
}