#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum PhonebookPath {
Pb,
Ich,
Och,
Mch,
Cch,
Spd,
Fav,
}
impl PhonebookPath {
#[must_use]
pub const fn pull_name(self) -> &'static str {
match self {
Self::Pb => "telecom/pb.vcf",
Self::Ich => "telecom/ich.vcf",
Self::Och => "telecom/och.vcf",
Self::Mch => "telecom/mch.vcf",
Self::Cch => "telecom/cch.vcf",
Self::Spd => "telecom/spd.vcf",
Self::Fav => "telecom/fav.vcf",
}
}
#[must_use]
pub const fn list_name(self) -> &'static str {
match self {
Self::Pb => "telecom/pb",
Self::Ich => "telecom/ich",
Self::Och => "telecom/och",
Self::Mch => "telecom/mch",
Self::Cch => "telecom/cch",
Self::Spd => "telecom/spd",
Self::Fav => "telecom/fav",
}
}
#[must_use]
pub fn entry_name(self, handle: &str) -> String {
format!("{}/{}", self.list_name(), handle)
}
}