#[derive(Debug, Clone, Copy, Hash, PartialEq, Eq)]
pub enum Duployan {
LetterH,
LetterX,
LetterP,
LetterT,
LetterF,
LetterK,
LetterL,
LetterB,
LetterD,
LetterV,
LetterG,
LetterR,
LetterPN,
LetterDS,
LetterFN,
LetterKM,
LetterRS,
LetterTh,
LetterSloanDh,
LetterDh,
LetterKk,
LetterSloanJ,
LetterHl,
LetterLh,
LetterRh,
LetterM,
LetterN,
LetterJ,
LetterS,
LetterMN,
LetterNM,
LetterJM,
LetterSJ,
LetterMWithDot,
LetterNWithDot,
LetterJWithDot,
LetterJWithDotsInsideAndAbove,
LetterSWithDot,
LetterSWithDotBelow,
LetterMS,
LetterNS,
LetterJS,
LetterSS,
LetterMNS,
LetterNMS,
LetterJMS,
LetterSJS,
LetterJSWithDot,
LetterJN,
LetterJNS,
LetterST,
LetterSTR,
LetterSP,
LetterSPR,
LetterTS,
LetterTRS,
LetterW,
LetterWh,
LetterWR,
LetterSN,
LetterSM,
LetterKRS,
LetterGRS,
LetterSK,
LetterSKR,
LetterA,
LetterSloanOw,
LetterOa,
LetterO,
LetterAou,
LetterI,
LetterE,
LetterIe,
LetterShortI,
LetterUi,
LetterEe,
LetterSloanEh,
LetterRomanianI,
LetterSloanEe,
LetterLongI,
LetterYe,
LetterU,
LetterEu,
LetterXw,
LetterUN,
LetterLongU,
LetterRomanianU,
LetterUh,
LetterSloanU,
LetterOoh,
LetterOw,
LetterOu,
LetterWa,
LetterWo,
LetterWi,
LetterWei,
LetterWow,
LetterNasalU,
LetterNasalO,
LetterNasalI,
LetterNasalA,
LetterPerninAn,
LetterPerninAm,
LetterSloanEn,
LetterSloanAn,
LetterSloanOn,
LetterVocalicM,
AffixLeftHorizontalSecant,
AffixMidHorizontalSecant,
AffixRightHorizontalSecant,
AffixLowVerticalSecant,
AffixMidVerticalSecant,
AffixHighVerticalSecant,
AffixAttachedSecant,
AffixAttachedLeftDashToDashRightSecant,
AffixAttachedTangent,
AffixAttachedTail,
AffixAttachedEHook,
AffixAttachedIHook,
AffixAttachedTangentHook,
AffixHighAcute,
AffixHighTightAcute,
AffixHighGrave,
AffixHighLongGrave,
AffixHighDot,
AffixHighCircle,
AffixHighLine,
AffixHighWave,
AffixHighVertical,
AffixLowAcute,
AffixLowTightAcute,
AffixLowGrave,
AffixLowLongGrave,
AffixLowDot,
AffixLowCircle,
AffixLowLine,
AffixLowWave,
AffixLowVertical,
AffixLowArrow,
SignOWithCross,
ThickLetterSelector,
DoubleMark,
}
impl Into<char> for Duployan {
fn into(self) -> char {
match self {
Duployan::LetterH => '𛰀',
Duployan::LetterX => '𛰁',
Duployan::LetterP => '𛰂',
Duployan::LetterT => '𛰃',
Duployan::LetterF => '𛰄',
Duployan::LetterK => '𛰅',
Duployan::LetterL => '𛰆',
Duployan::LetterB => '𛰇',
Duployan::LetterD => '𛰈',
Duployan::LetterV => '𛰉',
Duployan::LetterG => '𛰊',
Duployan::LetterR => '𛰋',
Duployan::LetterPN => '𛰌',
Duployan::LetterDS => '𛰍',
Duployan::LetterFN => '𛰎',
Duployan::LetterKM => '𛰏',
Duployan::LetterRS => '𛰐',
Duployan::LetterTh => '𛰑',
Duployan::LetterSloanDh => '𛰒',
Duployan::LetterDh => '𛰓',
Duployan::LetterKk => '𛰔',
Duployan::LetterSloanJ => '𛰕',
Duployan::LetterHl => '𛰖',
Duployan::LetterLh => '𛰗',
Duployan::LetterRh => '𛰘',
Duployan::LetterM => '𛰙',
Duployan::LetterN => '𛰚',
Duployan::LetterJ => '𛰛',
Duployan::LetterS => '𛰜',
Duployan::LetterMN => '𛰝',
Duployan::LetterNM => '𛰞',
Duployan::LetterJM => '𛰟',
Duployan::LetterSJ => '𛰠',
Duployan::LetterMWithDot => '𛰡',
Duployan::LetterNWithDot => '𛰢',
Duployan::LetterJWithDot => '𛰣',
Duployan::LetterJWithDotsInsideAndAbove => '𛰤',
Duployan::LetterSWithDot => '𛰥',
Duployan::LetterSWithDotBelow => '𛰦',
Duployan::LetterMS => '𛰧',
Duployan::LetterNS => '𛰨',
Duployan::LetterJS => '𛰩',
Duployan::LetterSS => '𛰪',
Duployan::LetterMNS => '𛰫',
Duployan::LetterNMS => '𛰬',
Duployan::LetterJMS => '𛰭',
Duployan::LetterSJS => '𛰮',
Duployan::LetterJSWithDot => '𛰯',
Duployan::LetterJN => '𛰰',
Duployan::LetterJNS => '𛰱',
Duployan::LetterST => '𛰲',
Duployan::LetterSTR => '𛰳',
Duployan::LetterSP => '𛰴',
Duployan::LetterSPR => '𛰵',
Duployan::LetterTS => '𛰶',
Duployan::LetterTRS => '𛰷',
Duployan::LetterW => '𛰸',
Duployan::LetterWh => '𛰹',
Duployan::LetterWR => '𛰺',
Duployan::LetterSN => '𛰻',
Duployan::LetterSM => '𛰼',
Duployan::LetterKRS => '𛰽',
Duployan::LetterGRS => '𛰾',
Duployan::LetterSK => '𛰿',
Duployan::LetterSKR => '𛱀',
Duployan::LetterA => '𛱁',
Duployan::LetterSloanOw => '𛱂',
Duployan::LetterOa => '𛱃',
Duployan::LetterO => '𛱄',
Duployan::LetterAou => '𛱅',
Duployan::LetterI => '𛱆',
Duployan::LetterE => '𛱇',
Duployan::LetterIe => '𛱈',
Duployan::LetterShortI => '𛱉',
Duployan::LetterUi => '𛱊',
Duployan::LetterEe => '𛱋',
Duployan::LetterSloanEh => '𛱌',
Duployan::LetterRomanianI => '𛱍',
Duployan::LetterSloanEe => '𛱎',
Duployan::LetterLongI => '𛱏',
Duployan::LetterYe => '𛱐',
Duployan::LetterU => '𛱑',
Duployan::LetterEu => '𛱒',
Duployan::LetterXw => '𛱓',
Duployan::LetterUN => '𛱔',
Duployan::LetterLongU => '𛱕',
Duployan::LetterRomanianU => '𛱖',
Duployan::LetterUh => '𛱗',
Duployan::LetterSloanU => '𛱘',
Duployan::LetterOoh => '𛱙',
Duployan::LetterOw => '𛱚',
Duployan::LetterOu => '𛱛',
Duployan::LetterWa => '𛱜',
Duployan::LetterWo => '𛱝',
Duployan::LetterWi => '𛱞',
Duployan::LetterWei => '𛱟',
Duployan::LetterWow => '𛱠',
Duployan::LetterNasalU => '𛱡',
Duployan::LetterNasalO => '𛱢',
Duployan::LetterNasalI => '𛱣',
Duployan::LetterNasalA => '𛱤',
Duployan::LetterPerninAn => '𛱥',
Duployan::LetterPerninAm => '𛱦',
Duployan::LetterSloanEn => '𛱧',
Duployan::LetterSloanAn => '𛱨',
Duployan::LetterSloanOn => '𛱩',
Duployan::LetterVocalicM => '𛱪',
Duployan::AffixLeftHorizontalSecant => '𛱰',
Duployan::AffixMidHorizontalSecant => '𛱱',
Duployan::AffixRightHorizontalSecant => '𛱲',
Duployan::AffixLowVerticalSecant => '𛱳',
Duployan::AffixMidVerticalSecant => '𛱴',
Duployan::AffixHighVerticalSecant => '𛱵',
Duployan::AffixAttachedSecant => '𛱶',
Duployan::AffixAttachedLeftDashToDashRightSecant => '𛱷',
Duployan::AffixAttachedTangent => '𛱸',
Duployan::AffixAttachedTail => '𛱹',
Duployan::AffixAttachedEHook => '𛱺',
Duployan::AffixAttachedIHook => '𛱻',
Duployan::AffixAttachedTangentHook => '𛱼',
Duployan::AffixHighAcute => '𛲀',
Duployan::AffixHighTightAcute => '𛲁',
Duployan::AffixHighGrave => '𛲂',
Duployan::AffixHighLongGrave => '𛲃',
Duployan::AffixHighDot => '𛲄',
Duployan::AffixHighCircle => '𛲅',
Duployan::AffixHighLine => '𛲆',
Duployan::AffixHighWave => '𛲇',
Duployan::AffixHighVertical => '𛲈',
Duployan::AffixLowAcute => '𛲐',
Duployan::AffixLowTightAcute => '𛲑',
Duployan::AffixLowGrave => '𛲒',
Duployan::AffixLowLongGrave => '𛲓',
Duployan::AffixLowDot => '𛲔',
Duployan::AffixLowCircle => '𛲕',
Duployan::AffixLowLine => '𛲖',
Duployan::AffixLowWave => '𛲗',
Duployan::AffixLowVertical => '𛲘',
Duployan::AffixLowArrow => '𛲙',
Duployan::SignOWithCross => '𛲜',
Duployan::ThickLetterSelector => '𛲝',
Duployan::DoubleMark => '𛲞',
}
}
}
impl std::convert::TryFrom<char> for Duployan {
type Error = ();
fn try_from(c: char) -> Result<Self, Self::Error> {
match c {
'𛰀' => Ok(Duployan::LetterH),
'𛰁' => Ok(Duployan::LetterX),
'𛰂' => Ok(Duployan::LetterP),
'𛰃' => Ok(Duployan::LetterT),
'𛰄' => Ok(Duployan::LetterF),
'𛰅' => Ok(Duployan::LetterK),
'𛰆' => Ok(Duployan::LetterL),
'𛰇' => Ok(Duployan::LetterB),
'𛰈' => Ok(Duployan::LetterD),
'𛰉' => Ok(Duployan::LetterV),
'𛰊' => Ok(Duployan::LetterG),
'𛰋' => Ok(Duployan::LetterR),
'𛰌' => Ok(Duployan::LetterPN),
'𛰍' => Ok(Duployan::LetterDS),
'𛰎' => Ok(Duployan::LetterFN),
'𛰏' => Ok(Duployan::LetterKM),
'𛰐' => Ok(Duployan::LetterRS),
'𛰑' => Ok(Duployan::LetterTh),
'𛰒' => Ok(Duployan::LetterSloanDh),
'𛰓' => Ok(Duployan::LetterDh),
'𛰔' => Ok(Duployan::LetterKk),
'𛰕' => Ok(Duployan::LetterSloanJ),
'𛰖' => Ok(Duployan::LetterHl),
'𛰗' => Ok(Duployan::LetterLh),
'𛰘' => Ok(Duployan::LetterRh),
'𛰙' => Ok(Duployan::LetterM),
'𛰚' => Ok(Duployan::LetterN),
'𛰛' => Ok(Duployan::LetterJ),
'𛰜' => Ok(Duployan::LetterS),
'𛰝' => Ok(Duployan::LetterMN),
'𛰞' => Ok(Duployan::LetterNM),
'𛰟' => Ok(Duployan::LetterJM),
'𛰠' => Ok(Duployan::LetterSJ),
'𛰡' => Ok(Duployan::LetterMWithDot),
'𛰢' => Ok(Duployan::LetterNWithDot),
'𛰣' => Ok(Duployan::LetterJWithDot),
'𛰤' => Ok(Duployan::LetterJWithDotsInsideAndAbove),
'𛰥' => Ok(Duployan::LetterSWithDot),
'𛰦' => Ok(Duployan::LetterSWithDotBelow),
'𛰧' => Ok(Duployan::LetterMS),
'𛰨' => Ok(Duployan::LetterNS),
'𛰩' => Ok(Duployan::LetterJS),
'𛰪' => Ok(Duployan::LetterSS),
'𛰫' => Ok(Duployan::LetterMNS),
'𛰬' => Ok(Duployan::LetterNMS),
'𛰭' => Ok(Duployan::LetterJMS),
'𛰮' => Ok(Duployan::LetterSJS),
'𛰯' => Ok(Duployan::LetterJSWithDot),
'𛰰' => Ok(Duployan::LetterJN),
'𛰱' => Ok(Duployan::LetterJNS),
'𛰲' => Ok(Duployan::LetterST),
'𛰳' => Ok(Duployan::LetterSTR),
'𛰴' => Ok(Duployan::LetterSP),
'𛰵' => Ok(Duployan::LetterSPR),
'𛰶' => Ok(Duployan::LetterTS),
'𛰷' => Ok(Duployan::LetterTRS),
'𛰸' => Ok(Duployan::LetterW),
'𛰹' => Ok(Duployan::LetterWh),
'𛰺' => Ok(Duployan::LetterWR),
'𛰻' => Ok(Duployan::LetterSN),
'𛰼' => Ok(Duployan::LetterSM),
'𛰽' => Ok(Duployan::LetterKRS),
'𛰾' => Ok(Duployan::LetterGRS),
'𛰿' => Ok(Duployan::LetterSK),
'𛱀' => Ok(Duployan::LetterSKR),
'𛱁' => Ok(Duployan::LetterA),
'𛱂' => Ok(Duployan::LetterSloanOw),
'𛱃' => Ok(Duployan::LetterOa),
'𛱄' => Ok(Duployan::LetterO),
'𛱅' => Ok(Duployan::LetterAou),
'𛱆' => Ok(Duployan::LetterI),
'𛱇' => Ok(Duployan::LetterE),
'𛱈' => Ok(Duployan::LetterIe),
'𛱉' => Ok(Duployan::LetterShortI),
'𛱊' => Ok(Duployan::LetterUi),
'𛱋' => Ok(Duployan::LetterEe),
'𛱌' => Ok(Duployan::LetterSloanEh),
'𛱍' => Ok(Duployan::LetterRomanianI),
'𛱎' => Ok(Duployan::LetterSloanEe),
'𛱏' => Ok(Duployan::LetterLongI),
'𛱐' => Ok(Duployan::LetterYe),
'𛱑' => Ok(Duployan::LetterU),
'𛱒' => Ok(Duployan::LetterEu),
'𛱓' => Ok(Duployan::LetterXw),
'𛱔' => Ok(Duployan::LetterUN),
'𛱕' => Ok(Duployan::LetterLongU),
'𛱖' => Ok(Duployan::LetterRomanianU),
'𛱗' => Ok(Duployan::LetterUh),
'𛱘' => Ok(Duployan::LetterSloanU),
'𛱙' => Ok(Duployan::LetterOoh),
'𛱚' => Ok(Duployan::LetterOw),
'𛱛' => Ok(Duployan::LetterOu),
'𛱜' => Ok(Duployan::LetterWa),
'𛱝' => Ok(Duployan::LetterWo),
'𛱞' => Ok(Duployan::LetterWi),
'𛱟' => Ok(Duployan::LetterWei),
'𛱠' => Ok(Duployan::LetterWow),
'𛱡' => Ok(Duployan::LetterNasalU),
'𛱢' => Ok(Duployan::LetterNasalO),
'𛱣' => Ok(Duployan::LetterNasalI),
'𛱤' => Ok(Duployan::LetterNasalA),
'𛱥' => Ok(Duployan::LetterPerninAn),
'𛱦' => Ok(Duployan::LetterPerninAm),
'𛱧' => Ok(Duployan::LetterSloanEn),
'𛱨' => Ok(Duployan::LetterSloanAn),
'𛱩' => Ok(Duployan::LetterSloanOn),
'𛱪' => Ok(Duployan::LetterVocalicM),
'𛱰' => Ok(Duployan::AffixLeftHorizontalSecant),
'𛱱' => Ok(Duployan::AffixMidHorizontalSecant),
'𛱲' => Ok(Duployan::AffixRightHorizontalSecant),
'𛱳' => Ok(Duployan::AffixLowVerticalSecant),
'𛱴' => Ok(Duployan::AffixMidVerticalSecant),
'𛱵' => Ok(Duployan::AffixHighVerticalSecant),
'𛱶' => Ok(Duployan::AffixAttachedSecant),
'𛱷' => Ok(Duployan::AffixAttachedLeftDashToDashRightSecant),
'𛱸' => Ok(Duployan::AffixAttachedTangent),
'𛱹' => Ok(Duployan::AffixAttachedTail),
'𛱺' => Ok(Duployan::AffixAttachedEHook),
'𛱻' => Ok(Duployan::AffixAttachedIHook),
'𛱼' => Ok(Duployan::AffixAttachedTangentHook),
'𛲀' => Ok(Duployan::AffixHighAcute),
'𛲁' => Ok(Duployan::AffixHighTightAcute),
'𛲂' => Ok(Duployan::AffixHighGrave),
'𛲃' => Ok(Duployan::AffixHighLongGrave),
'𛲄' => Ok(Duployan::AffixHighDot),
'𛲅' => Ok(Duployan::AffixHighCircle),
'𛲆' => Ok(Duployan::AffixHighLine),
'𛲇' => Ok(Duployan::AffixHighWave),
'𛲈' => Ok(Duployan::AffixHighVertical),
'𛲐' => Ok(Duployan::AffixLowAcute),
'𛲑' => Ok(Duployan::AffixLowTightAcute),
'𛲒' => Ok(Duployan::AffixLowGrave),
'𛲓' => Ok(Duployan::AffixLowLongGrave),
'𛲔' => Ok(Duployan::AffixLowDot),
'𛲕' => Ok(Duployan::AffixLowCircle),
'𛲖' => Ok(Duployan::AffixLowLine),
'𛲗' => Ok(Duployan::AffixLowWave),
'𛲘' => Ok(Duployan::AffixLowVertical),
'𛲙' => Ok(Duployan::AffixLowArrow),
'𛲜' => Ok(Duployan::SignOWithCross),
'𛲝' => Ok(Duployan::ThickLetterSelector),
'𛲞' => Ok(Duployan::DoubleMark),
_ => Err(()),
}
}
}
impl Into<u32> for Duployan {
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 Duployan {
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 Duployan {
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 Duployan {
pub fn new() -> Self {
Duployan::LetterH
}
pub fn name(&self) -> String {
let s = std::format!("Duployan{:#?}", self);
string_morph::to_sentence_case(&s)
}
}