use serde::{Deserialize, Serialize};
#[derive(
Debug, Clone, Copy, PartialEq, Eq, Default, Serialize, Deserialize,
)]
#[serde(rename_all = "lowercase")]
pub enum GlyphVariant {
#[default]
Unicode,
Ascii,
}
#[derive(Debug, Clone, Copy)]
pub struct Glyphs {
pub variant: GlyphVariant,
pub check: &'static str,
pub bullet: &'static str,
pub pointer: &'static str,
}
impl Glyphs {
pub fn new(variant: GlyphVariant) -> Self {
match variant {
GlyphVariant::Unicode => Self {
variant,
check: "\u{2713}",
bullet: "\u{2022}",
pointer: "\u{203a}",
},
GlyphVariant::Ascii => Self {
variant,
check: "x",
bullet: "*",
pointer: ">",
},
}
}
}