#[derive(Copy, Debug, Eq, PartialEq, Clone, Default)]
#[non_exhaustive]
pub struct UnitsFormatterOptions {
pub width: Width,
}
impl From<Width> for UnitsFormatterOptions {
fn from(width: Width) -> Self {
Self { width }
}
}
#[derive(Debug, Eq, PartialEq, Clone, Copy, Default)]
#[non_exhaustive]
pub enum Width {
Long,
#[default]
Short,
Narrow,
}
impl From<Width> for tinystr::TinyStr8 {
fn from(width: Width) -> Self {
match width {
Width::Long => "long".parse().unwrap(),
Width::Short => "short".parse().unwrap(),
Width::Narrow => "narrow".parse().unwrap(),
}
}
}