#[derive(Debug, Clone, Copy, Hash, PartialEq, Eq)]
pub enum CombiningDiacriticalMarksSupplement {
CombiningDottedGraveAccent,
CombiningDottedAcuteAccent,
CombiningSnakeBelow,
CombiningSuspensionMark,
CombiningMacronDashAcute,
CombiningGraveDashMacron,
CombiningMacronDashGrave,
CombiningAcuteDashMacron,
CombiningGraveDashAcuteDashGrave,
CombiningAcuteDashGraveDashAcute,
CombiningLatinSmallLetterRBelow,
CombiningBreveDashMacron,
CombiningMacronDashBreve,
CombiningDoubleCircumflexAbove,
CombiningOgonekAbove,
CombiningZigzagBelow,
CombiningIsBelow,
CombiningUrAbove,
CombiningUsAbove,
CombiningLatinSmallLetterFlattenedOpenAAbove,
CombiningLatinSmallLetterAe,
CombiningLatinSmallLetterAo,
CombiningLatinSmallLetterAv,
CombiningLatinSmallLetterCCedilla,
CombiningLatinSmallLetterInsularD,
CombiningLatinSmallLetterEth,
CombiningLatinSmallLetterG,
CombiningLatinLetterSmallCapitalG,
CombiningLatinSmallLetterK,
CombiningLatinSmallLetterL,
CombiningLatinLetterSmallCapitalL,
CombiningLatinLetterSmallCapitalM,
CombiningLatinSmallLetterN,
CombiningLatinLetterSmallCapitalN,
CombiningLatinLetterSmallCapitalR,
CombiningLatinSmallLetterRRotunda,
CombiningLatinSmallLetterS,
CombiningLatinSmallLetterLongS,
CombiningLatinSmallLetterZ,
CombiningLatinSmallLetterAlpha,
CombiningLatinSmallLetterB,
CombiningLatinSmallLetterBeta,
CombiningLatinSmallLetterSchwa,
CombiningLatinSmallLetterF,
CombiningLatinSmallLetterLWithDoubleMiddleTilde,
CombiningLatinSmallLetterOWithLightCentralizationStroke,
CombiningLatinSmallLetterP,
CombiningLatinSmallLetterEsh,
CombiningLatinSmallLetterUWithLightCentralizationStroke,
CombiningLatinSmallLetterW,
CombiningLatinSmallLetterAWithDiaeresis,
CombiningLatinSmallLetterOWithDiaeresis,
CombiningLatinSmallLetterUWithDiaeresis,
CombiningUpTackAbove,
CombiningKavykaAboveRight,
CombiningKavykaAboveLeft,
CombiningDotAboveLeft,
CombiningWideInvertedBridgeBelow,
CombiningDeletionMark,
CombiningDoubleInvertedBreveBelow,
CombiningAlmostEqualToBelow,
CombiningLeftArrowheadAbove,
}
impl Into<char> for CombiningDiacriticalMarksSupplement {
fn into(self) -> char {
match self {
CombiningDiacriticalMarksSupplement::CombiningDottedGraveAccent => '᷀',
CombiningDiacriticalMarksSupplement::CombiningDottedAcuteAccent => '᷁',
CombiningDiacriticalMarksSupplement::CombiningSnakeBelow => '᷂',
CombiningDiacriticalMarksSupplement::CombiningSuspensionMark => '᷃',
CombiningDiacriticalMarksSupplement::CombiningMacronDashAcute => '᷄',
CombiningDiacriticalMarksSupplement::CombiningGraveDashMacron => '᷅',
CombiningDiacriticalMarksSupplement::CombiningMacronDashGrave => '᷆',
CombiningDiacriticalMarksSupplement::CombiningAcuteDashMacron => '᷇',
CombiningDiacriticalMarksSupplement::CombiningGraveDashAcuteDashGrave => '᷈',
CombiningDiacriticalMarksSupplement::CombiningAcuteDashGraveDashAcute => '᷉',
CombiningDiacriticalMarksSupplement::CombiningLatinSmallLetterRBelow => '᷊',
CombiningDiacriticalMarksSupplement::CombiningBreveDashMacron => '᷋',
CombiningDiacriticalMarksSupplement::CombiningMacronDashBreve => '᷌',
CombiningDiacriticalMarksSupplement::CombiningDoubleCircumflexAbove => '᷍',
CombiningDiacriticalMarksSupplement::CombiningOgonekAbove => '᷎',
CombiningDiacriticalMarksSupplement::CombiningZigzagBelow => '᷏',
CombiningDiacriticalMarksSupplement::CombiningIsBelow => '᷐',
CombiningDiacriticalMarksSupplement::CombiningUrAbove => '᷑',
CombiningDiacriticalMarksSupplement::CombiningUsAbove => '᷒',
CombiningDiacriticalMarksSupplement::CombiningLatinSmallLetterFlattenedOpenAAbove => 'ᷓ',
CombiningDiacriticalMarksSupplement::CombiningLatinSmallLetterAe => 'ᷔ',
CombiningDiacriticalMarksSupplement::CombiningLatinSmallLetterAo => 'ᷕ',
CombiningDiacriticalMarksSupplement::CombiningLatinSmallLetterAv => 'ᷖ',
CombiningDiacriticalMarksSupplement::CombiningLatinSmallLetterCCedilla => 'ᷗ',
CombiningDiacriticalMarksSupplement::CombiningLatinSmallLetterInsularD => 'ᷘ',
CombiningDiacriticalMarksSupplement::CombiningLatinSmallLetterEth => 'ᷙ',
CombiningDiacriticalMarksSupplement::CombiningLatinSmallLetterG => 'ᷚ',
CombiningDiacriticalMarksSupplement::CombiningLatinLetterSmallCapitalG => 'ᷛ',
CombiningDiacriticalMarksSupplement::CombiningLatinSmallLetterK => 'ᷜ',
CombiningDiacriticalMarksSupplement::CombiningLatinSmallLetterL => 'ᷝ',
CombiningDiacriticalMarksSupplement::CombiningLatinLetterSmallCapitalL => 'ᷞ',
CombiningDiacriticalMarksSupplement::CombiningLatinLetterSmallCapitalM => 'ᷟ',
CombiningDiacriticalMarksSupplement::CombiningLatinSmallLetterN => 'ᷠ',
CombiningDiacriticalMarksSupplement::CombiningLatinLetterSmallCapitalN => 'ᷡ',
CombiningDiacriticalMarksSupplement::CombiningLatinLetterSmallCapitalR => 'ᷢ',
CombiningDiacriticalMarksSupplement::CombiningLatinSmallLetterRRotunda => 'ᷣ',
CombiningDiacriticalMarksSupplement::CombiningLatinSmallLetterS => 'ᷤ',
CombiningDiacriticalMarksSupplement::CombiningLatinSmallLetterLongS => 'ᷥ',
CombiningDiacriticalMarksSupplement::CombiningLatinSmallLetterZ => 'ᷦ',
CombiningDiacriticalMarksSupplement::CombiningLatinSmallLetterAlpha => 'ᷧ',
CombiningDiacriticalMarksSupplement::CombiningLatinSmallLetterB => 'ᷨ',
CombiningDiacriticalMarksSupplement::CombiningLatinSmallLetterBeta => 'ᷩ',
CombiningDiacriticalMarksSupplement::CombiningLatinSmallLetterSchwa => 'ᷪ',
CombiningDiacriticalMarksSupplement::CombiningLatinSmallLetterF => 'ᷫ',
CombiningDiacriticalMarksSupplement::CombiningLatinSmallLetterLWithDoubleMiddleTilde => 'ᷬ',
CombiningDiacriticalMarksSupplement::CombiningLatinSmallLetterOWithLightCentralizationStroke => 'ᷭ',
CombiningDiacriticalMarksSupplement::CombiningLatinSmallLetterP => 'ᷮ',
CombiningDiacriticalMarksSupplement::CombiningLatinSmallLetterEsh => 'ᷯ',
CombiningDiacriticalMarksSupplement::CombiningLatinSmallLetterUWithLightCentralizationStroke => 'ᷰ',
CombiningDiacriticalMarksSupplement::CombiningLatinSmallLetterW => 'ᷱ',
CombiningDiacriticalMarksSupplement::CombiningLatinSmallLetterAWithDiaeresis => 'ᷲ',
CombiningDiacriticalMarksSupplement::CombiningLatinSmallLetterOWithDiaeresis => 'ᷳ',
CombiningDiacriticalMarksSupplement::CombiningLatinSmallLetterUWithDiaeresis => 'ᷴ',
CombiningDiacriticalMarksSupplement::CombiningUpTackAbove => '᷵',
CombiningDiacriticalMarksSupplement::CombiningKavykaAboveRight => '᷶',
CombiningDiacriticalMarksSupplement::CombiningKavykaAboveLeft => '᷷',
CombiningDiacriticalMarksSupplement::CombiningDotAboveLeft => '᷸',
CombiningDiacriticalMarksSupplement::CombiningWideInvertedBridgeBelow => '᷹',
CombiningDiacriticalMarksSupplement::CombiningDeletionMark => '᷻',
CombiningDiacriticalMarksSupplement::CombiningDoubleInvertedBreveBelow => '᷼',
CombiningDiacriticalMarksSupplement::CombiningAlmostEqualToBelow => '᷽',
CombiningDiacriticalMarksSupplement::CombiningLeftArrowheadAbove => '᷾',
}
}
}
impl std::convert::TryFrom<char> for CombiningDiacriticalMarksSupplement {
type Error = ();
fn try_from(c: char) -> Result<Self, Self::Error> {
match c {
'᷀' => Ok(CombiningDiacriticalMarksSupplement::CombiningDottedGraveAccent),
'᷁' => Ok(CombiningDiacriticalMarksSupplement::CombiningDottedAcuteAccent),
'᷂' => Ok(CombiningDiacriticalMarksSupplement::CombiningSnakeBelow),
'᷃' => Ok(CombiningDiacriticalMarksSupplement::CombiningSuspensionMark),
'᷄' => Ok(CombiningDiacriticalMarksSupplement::CombiningMacronDashAcute),
'᷅' => Ok(CombiningDiacriticalMarksSupplement::CombiningGraveDashMacron),
'᷆' => Ok(CombiningDiacriticalMarksSupplement::CombiningMacronDashGrave),
'᷇' => Ok(CombiningDiacriticalMarksSupplement::CombiningAcuteDashMacron),
'᷈' => Ok(CombiningDiacriticalMarksSupplement::CombiningGraveDashAcuteDashGrave),
'᷉' => Ok(CombiningDiacriticalMarksSupplement::CombiningAcuteDashGraveDashAcute),
'᷊' => Ok(CombiningDiacriticalMarksSupplement::CombiningLatinSmallLetterRBelow),
'᷋' => Ok(CombiningDiacriticalMarksSupplement::CombiningBreveDashMacron),
'᷌' => Ok(CombiningDiacriticalMarksSupplement::CombiningMacronDashBreve),
'᷍' => Ok(CombiningDiacriticalMarksSupplement::CombiningDoubleCircumflexAbove),
'᷎' => Ok(CombiningDiacriticalMarksSupplement::CombiningOgonekAbove),
'᷏' => Ok(CombiningDiacriticalMarksSupplement::CombiningZigzagBelow),
'᷐' => Ok(CombiningDiacriticalMarksSupplement::CombiningIsBelow),
'᷑' => Ok(CombiningDiacriticalMarksSupplement::CombiningUrAbove),
'᷒' => Ok(CombiningDiacriticalMarksSupplement::CombiningUsAbove),
'ᷓ' => Ok(CombiningDiacriticalMarksSupplement::CombiningLatinSmallLetterFlattenedOpenAAbove),
'ᷔ' => Ok(CombiningDiacriticalMarksSupplement::CombiningLatinSmallLetterAe),
'ᷕ' => Ok(CombiningDiacriticalMarksSupplement::CombiningLatinSmallLetterAo),
'ᷖ' => Ok(CombiningDiacriticalMarksSupplement::CombiningLatinSmallLetterAv),
'ᷗ' => Ok(CombiningDiacriticalMarksSupplement::CombiningLatinSmallLetterCCedilla),
'ᷘ' => Ok(CombiningDiacriticalMarksSupplement::CombiningLatinSmallLetterInsularD),
'ᷙ' => Ok(CombiningDiacriticalMarksSupplement::CombiningLatinSmallLetterEth),
'ᷚ' => Ok(CombiningDiacriticalMarksSupplement::CombiningLatinSmallLetterG),
'ᷛ' => Ok(CombiningDiacriticalMarksSupplement::CombiningLatinLetterSmallCapitalG),
'ᷜ' => Ok(CombiningDiacriticalMarksSupplement::CombiningLatinSmallLetterK),
'ᷝ' => Ok(CombiningDiacriticalMarksSupplement::CombiningLatinSmallLetterL),
'ᷞ' => Ok(CombiningDiacriticalMarksSupplement::CombiningLatinLetterSmallCapitalL),
'ᷟ' => Ok(CombiningDiacriticalMarksSupplement::CombiningLatinLetterSmallCapitalM),
'ᷠ' => Ok(CombiningDiacriticalMarksSupplement::CombiningLatinSmallLetterN),
'ᷡ' => Ok(CombiningDiacriticalMarksSupplement::CombiningLatinLetterSmallCapitalN),
'ᷢ' => Ok(CombiningDiacriticalMarksSupplement::CombiningLatinLetterSmallCapitalR),
'ᷣ' => Ok(CombiningDiacriticalMarksSupplement::CombiningLatinSmallLetterRRotunda),
'ᷤ' => Ok(CombiningDiacriticalMarksSupplement::CombiningLatinSmallLetterS),
'ᷥ' => Ok(CombiningDiacriticalMarksSupplement::CombiningLatinSmallLetterLongS),
'ᷦ' => Ok(CombiningDiacriticalMarksSupplement::CombiningLatinSmallLetterZ),
'ᷧ' => Ok(CombiningDiacriticalMarksSupplement::CombiningLatinSmallLetterAlpha),
'ᷨ' => Ok(CombiningDiacriticalMarksSupplement::CombiningLatinSmallLetterB),
'ᷩ' => Ok(CombiningDiacriticalMarksSupplement::CombiningLatinSmallLetterBeta),
'ᷪ' => Ok(CombiningDiacriticalMarksSupplement::CombiningLatinSmallLetterSchwa),
'ᷫ' => Ok(CombiningDiacriticalMarksSupplement::CombiningLatinSmallLetterF),
'ᷬ' => Ok(CombiningDiacriticalMarksSupplement::CombiningLatinSmallLetterLWithDoubleMiddleTilde),
'ᷭ' => Ok(CombiningDiacriticalMarksSupplement::CombiningLatinSmallLetterOWithLightCentralizationStroke),
'ᷮ' => Ok(CombiningDiacriticalMarksSupplement::CombiningLatinSmallLetterP),
'ᷯ' => Ok(CombiningDiacriticalMarksSupplement::CombiningLatinSmallLetterEsh),
'ᷰ' => Ok(CombiningDiacriticalMarksSupplement::CombiningLatinSmallLetterUWithLightCentralizationStroke),
'ᷱ' => Ok(CombiningDiacriticalMarksSupplement::CombiningLatinSmallLetterW),
'ᷲ' => Ok(CombiningDiacriticalMarksSupplement::CombiningLatinSmallLetterAWithDiaeresis),
'ᷳ' => Ok(CombiningDiacriticalMarksSupplement::CombiningLatinSmallLetterOWithDiaeresis),
'ᷴ' => Ok(CombiningDiacriticalMarksSupplement::CombiningLatinSmallLetterUWithDiaeresis),
'᷵' => Ok(CombiningDiacriticalMarksSupplement::CombiningUpTackAbove),
'᷶' => Ok(CombiningDiacriticalMarksSupplement::CombiningKavykaAboveRight),
'᷷' => Ok(CombiningDiacriticalMarksSupplement::CombiningKavykaAboveLeft),
'᷸' => Ok(CombiningDiacriticalMarksSupplement::CombiningDotAboveLeft),
'᷹' => Ok(CombiningDiacriticalMarksSupplement::CombiningWideInvertedBridgeBelow),
'᷻' => Ok(CombiningDiacriticalMarksSupplement::CombiningDeletionMark),
'᷼' => Ok(CombiningDiacriticalMarksSupplement::CombiningDoubleInvertedBreveBelow),
'᷽' => Ok(CombiningDiacriticalMarksSupplement::CombiningAlmostEqualToBelow),
'᷾' => Ok(CombiningDiacriticalMarksSupplement::CombiningLeftArrowheadAbove),
_ => Err(()),
}
}
}
impl Into<u32> for CombiningDiacriticalMarksSupplement {
fn into(self) -> u32 {
let c: char = self.into();
let hex = c
.escape_unicode()
.to_string()
.replace("\\u{", "")
.replace("}", "");
u32::from_str_radix(&hex, 16).unwrap()
}
}
impl std::convert::TryFrom<u32> for CombiningDiacriticalMarksSupplement {
type Error = ();
fn try_from(u: u32) -> Result<Self, Self::Error> {
if let Ok(c) = char::try_from(u) {
Self::try_from(c)
} else {
Err(())
}
}
}
impl Iterator for CombiningDiacriticalMarksSupplement {
type Item = Self;
fn next(&mut self) -> Option<Self> {
let index: u32 = (*self).into();
use std::convert::TryFrom;
Self::try_from(index + 1).ok()
}
}
impl CombiningDiacriticalMarksSupplement {
pub fn new() -> Self {
CombiningDiacriticalMarksSupplement::CombiningDottedGraveAccent
}
pub fn name(&self) -> String {
let s = std::format!("CombiningDiacriticalMarksSupplement{:#?}", self);
string_morph::to_sentence_case(&s)
}
}