1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
#[derive(Clone, Copy, Default)] pub enum FieldLegendVariant { #[default] Legend, Label, } impl FieldLegendVariant { pub fn as_str(&self) -> &'static str { match self { Self::Legend => "legend", Self::Label => "label", } } }