unicode_types/generated/
duployan.rs

1
2/// An enum to represent all characters in the Duployan block.
3#[derive(Debug, Clone, Copy, Hash, PartialEq, Eq)]
4pub enum Duployan {
5    /// \u{1bc00}: '𛰀'
6    LetterH,
7    /// \u{1bc01}: '𛰁'
8    LetterX,
9    /// \u{1bc02}: '𛰂'
10    LetterP,
11    /// \u{1bc03}: '𛰃'
12    LetterT,
13    /// \u{1bc04}: '𛰄'
14    LetterF,
15    /// \u{1bc05}: '𛰅'
16    LetterK,
17    /// \u{1bc06}: '𛰆'
18    LetterL,
19    /// \u{1bc07}: '𛰇'
20    LetterB,
21    /// \u{1bc08}: '𛰈'
22    LetterD,
23    /// \u{1bc09}: '𛰉'
24    LetterV,
25    /// \u{1bc0a}: '𛰊'
26    LetterG,
27    /// \u{1bc0b}: '𛰋'
28    LetterR,
29    /// \u{1bc0c}: '𛰌'
30    LetterPN,
31    /// \u{1bc0d}: '𛰍'
32    LetterDS,
33    /// \u{1bc0e}: '𛰎'
34    LetterFN,
35    /// \u{1bc0f}: '𛰏'
36    LetterKM,
37    /// \u{1bc10}: '𛰐'
38    LetterRS,
39    /// \u{1bc11}: '𛰑'
40    LetterTh,
41    /// \u{1bc12}: '𛰒'
42    LetterSloanDh,
43    /// \u{1bc13}: '𛰓'
44    LetterDh,
45    /// \u{1bc14}: '𛰔'
46    LetterKk,
47    /// \u{1bc15}: '𛰕'
48    LetterSloanJ,
49    /// \u{1bc16}: '𛰖'
50    LetterHl,
51    /// \u{1bc17}: '𛰗'
52    LetterLh,
53    /// \u{1bc18}: '𛰘'
54    LetterRh,
55    /// \u{1bc19}: '𛰙'
56    LetterM,
57    /// \u{1bc1a}: '𛰚'
58    LetterN,
59    /// \u{1bc1b}: '𛰛'
60    LetterJ,
61    /// \u{1bc1c}: '𛰜'
62    LetterS,
63    /// \u{1bc1d}: '𛰝'
64    LetterMN,
65    /// \u{1bc1e}: '𛰞'
66    LetterNM,
67    /// \u{1bc1f}: '𛰟'
68    LetterJM,
69    /// \u{1bc20}: '𛰠'
70    LetterSJ,
71    /// \u{1bc21}: '𛰡'
72    LetterMWithDot,
73    /// \u{1bc22}: '𛰢'
74    LetterNWithDot,
75    /// \u{1bc23}: '𛰣'
76    LetterJWithDot,
77    /// \u{1bc24}: '𛰤'
78    LetterJWithDotsInsideAndAbove,
79    /// \u{1bc25}: '𛰥'
80    LetterSWithDot,
81    /// \u{1bc26}: '𛰦'
82    LetterSWithDotBelow,
83    /// \u{1bc27}: '𛰧'
84    LetterMS,
85    /// \u{1bc28}: '𛰨'
86    LetterNS,
87    /// \u{1bc29}: '𛰩'
88    LetterJS,
89    /// \u{1bc2a}: '𛰪'
90    LetterSS,
91    /// \u{1bc2b}: '𛰫'
92    LetterMNS,
93    /// \u{1bc2c}: '𛰬'
94    LetterNMS,
95    /// \u{1bc2d}: '𛰭'
96    LetterJMS,
97    /// \u{1bc2e}: '𛰮'
98    LetterSJS,
99    /// \u{1bc2f}: '𛰯'
100    LetterJSWithDot,
101    /// \u{1bc30}: '𛰰'
102    LetterJN,
103    /// \u{1bc31}: '𛰱'
104    LetterJNS,
105    /// \u{1bc32}: '𛰲'
106    LetterST,
107    /// \u{1bc33}: '𛰳'
108    LetterSTR,
109    /// \u{1bc34}: '𛰴'
110    LetterSP,
111    /// \u{1bc35}: '𛰵'
112    LetterSPR,
113    /// \u{1bc36}: '𛰶'
114    LetterTS,
115    /// \u{1bc37}: '𛰷'
116    LetterTRS,
117    /// \u{1bc38}: '𛰸'
118    LetterW,
119    /// \u{1bc39}: '𛰹'
120    LetterWh,
121    /// \u{1bc3a}: '𛰺'
122    LetterWR,
123    /// \u{1bc3b}: '𛰻'
124    LetterSN,
125    /// \u{1bc3c}: '𛰼'
126    LetterSM,
127    /// \u{1bc3d}: '𛰽'
128    LetterKRS,
129    /// \u{1bc3e}: '𛰾'
130    LetterGRS,
131    /// \u{1bc3f}: '𛰿'
132    LetterSK,
133    /// \u{1bc40}: '𛱀'
134    LetterSKR,
135    /// \u{1bc41}: '𛱁'
136    LetterA,
137    /// \u{1bc42}: '𛱂'
138    LetterSloanOw,
139    /// \u{1bc43}: '𛱃'
140    LetterOa,
141    /// \u{1bc44}: '𛱄'
142    LetterO,
143    /// \u{1bc45}: '𛱅'
144    LetterAou,
145    /// \u{1bc46}: '𛱆'
146    LetterI,
147    /// \u{1bc47}: '𛱇'
148    LetterE,
149    /// \u{1bc48}: '𛱈'
150    LetterIe,
151    /// \u{1bc49}: '𛱉'
152    LetterShortI,
153    /// \u{1bc4a}: '𛱊'
154    LetterUi,
155    /// \u{1bc4b}: '𛱋'
156    LetterEe,
157    /// \u{1bc4c}: '𛱌'
158    LetterSloanEh,
159    /// \u{1bc4d}: '𛱍'
160    LetterRomanianI,
161    /// \u{1bc4e}: '𛱎'
162    LetterSloanEe,
163    /// \u{1bc4f}: '𛱏'
164    LetterLongI,
165    /// \u{1bc50}: '𛱐'
166    LetterYe,
167    /// \u{1bc51}: '𛱑'
168    LetterU,
169    /// \u{1bc52}: '𛱒'
170    LetterEu,
171    /// \u{1bc53}: '𛱓'
172    LetterXw,
173    /// \u{1bc54}: '𛱔'
174    LetterUN,
175    /// \u{1bc55}: '𛱕'
176    LetterLongU,
177    /// \u{1bc56}: '𛱖'
178    LetterRomanianU,
179    /// \u{1bc57}: '𛱗'
180    LetterUh,
181    /// \u{1bc58}: '𛱘'
182    LetterSloanU,
183    /// \u{1bc59}: '𛱙'
184    LetterOoh,
185    /// \u{1bc5a}: '𛱚'
186    LetterOw,
187    /// \u{1bc5b}: '𛱛'
188    LetterOu,
189    /// \u{1bc5c}: '𛱜'
190    LetterWa,
191    /// \u{1bc5d}: '𛱝'
192    LetterWo,
193    /// \u{1bc5e}: '𛱞'
194    LetterWi,
195    /// \u{1bc5f}: '𛱟'
196    LetterWei,
197    /// \u{1bc60}: '𛱠'
198    LetterWow,
199    /// \u{1bc61}: '𛱡'
200    LetterNasalU,
201    /// \u{1bc62}: '𛱢'
202    LetterNasalO,
203    /// \u{1bc63}: '𛱣'
204    LetterNasalI,
205    /// \u{1bc64}: '𛱤'
206    LetterNasalA,
207    /// \u{1bc65}: '𛱥'
208    LetterPerninAn,
209    /// \u{1bc66}: '𛱦'
210    LetterPerninAm,
211    /// \u{1bc67}: '𛱧'
212    LetterSloanEn,
213    /// \u{1bc68}: '𛱨'
214    LetterSloanAn,
215    /// \u{1bc69}: '𛱩'
216    LetterSloanOn,
217    /// \u{1bc6a}: '𛱪'
218    LetterVocalicM,
219    /// \u{1bc70}: '𛱰'
220    AffixLeftHorizontalSecant,
221    /// \u{1bc71}: '𛱱'
222    AffixMidHorizontalSecant,
223    /// \u{1bc72}: '𛱲'
224    AffixRightHorizontalSecant,
225    /// \u{1bc73}: '𛱳'
226    AffixLowVerticalSecant,
227    /// \u{1bc74}: '𛱴'
228    AffixMidVerticalSecant,
229    /// \u{1bc75}: '𛱵'
230    AffixHighVerticalSecant,
231    /// \u{1bc76}: '𛱶'
232    AffixAttachedSecant,
233    /// \u{1bc77}: '𛱷'
234    AffixAttachedLeftDashToDashRightSecant,
235    /// \u{1bc78}: '𛱸'
236    AffixAttachedTangent,
237    /// \u{1bc79}: '𛱹'
238    AffixAttachedTail,
239    /// \u{1bc7a}: '𛱺'
240    AffixAttachedEHook,
241    /// \u{1bc7b}: '𛱻'
242    AffixAttachedIHook,
243    /// \u{1bc7c}: '𛱼'
244    AffixAttachedTangentHook,
245    /// \u{1bc80}: '𛲀'
246    AffixHighAcute,
247    /// \u{1bc81}: '𛲁'
248    AffixHighTightAcute,
249    /// \u{1bc82}: '𛲂'
250    AffixHighGrave,
251    /// \u{1bc83}: '𛲃'
252    AffixHighLongGrave,
253    /// \u{1bc84}: '𛲄'
254    AffixHighDot,
255    /// \u{1bc85}: '𛲅'
256    AffixHighCircle,
257    /// \u{1bc86}: '𛲆'
258    AffixHighLine,
259    /// \u{1bc87}: '𛲇'
260    AffixHighWave,
261    /// \u{1bc88}: '𛲈'
262    AffixHighVertical,
263    /// \u{1bc90}: '𛲐'
264    AffixLowAcute,
265    /// \u{1bc91}: '𛲑'
266    AffixLowTightAcute,
267    /// \u{1bc92}: '𛲒'
268    AffixLowGrave,
269    /// \u{1bc93}: '𛲓'
270    AffixLowLongGrave,
271    /// \u{1bc94}: '𛲔'
272    AffixLowDot,
273    /// \u{1bc95}: '𛲕'
274    AffixLowCircle,
275    /// \u{1bc96}: '𛲖'
276    AffixLowLine,
277    /// \u{1bc97}: '𛲗'
278    AffixLowWave,
279    /// \u{1bc98}: '𛲘'
280    AffixLowVertical,
281    /// \u{1bc99}: '𛲙'
282    AffixLowArrow,
283    /// \u{1bc9c}: '𛲜'
284    SignOWithCross,
285    /// \u{1bc9d}: '𛲝'
286    ThickLetterSelector,
287    /// \u{1bc9e}: '𛲞'
288    DoubleMark,
289}
290
291impl Into<char> for Duployan {
292    fn into(self) -> char {
293        match self {
294            Duployan::LetterH => '𛰀',
295            Duployan::LetterX => '𛰁',
296            Duployan::LetterP => '𛰂',
297            Duployan::LetterT => '𛰃',
298            Duployan::LetterF => '𛰄',
299            Duployan::LetterK => '𛰅',
300            Duployan::LetterL => '𛰆',
301            Duployan::LetterB => '𛰇',
302            Duployan::LetterD => '𛰈',
303            Duployan::LetterV => '𛰉',
304            Duployan::LetterG => '𛰊',
305            Duployan::LetterR => '𛰋',
306            Duployan::LetterPN => '𛰌',
307            Duployan::LetterDS => '𛰍',
308            Duployan::LetterFN => '𛰎',
309            Duployan::LetterKM => '𛰏',
310            Duployan::LetterRS => '𛰐',
311            Duployan::LetterTh => '𛰑',
312            Duployan::LetterSloanDh => '𛰒',
313            Duployan::LetterDh => '𛰓',
314            Duployan::LetterKk => '𛰔',
315            Duployan::LetterSloanJ => '𛰕',
316            Duployan::LetterHl => '𛰖',
317            Duployan::LetterLh => '𛰗',
318            Duployan::LetterRh => '𛰘',
319            Duployan::LetterM => '𛰙',
320            Duployan::LetterN => '𛰚',
321            Duployan::LetterJ => '𛰛',
322            Duployan::LetterS => '𛰜',
323            Duployan::LetterMN => '𛰝',
324            Duployan::LetterNM => '𛰞',
325            Duployan::LetterJM => '𛰟',
326            Duployan::LetterSJ => '𛰠',
327            Duployan::LetterMWithDot => '𛰡',
328            Duployan::LetterNWithDot => '𛰢',
329            Duployan::LetterJWithDot => '𛰣',
330            Duployan::LetterJWithDotsInsideAndAbove => '𛰤',
331            Duployan::LetterSWithDot => '𛰥',
332            Duployan::LetterSWithDotBelow => '𛰦',
333            Duployan::LetterMS => '𛰧',
334            Duployan::LetterNS => '𛰨',
335            Duployan::LetterJS => '𛰩',
336            Duployan::LetterSS => '𛰪',
337            Duployan::LetterMNS => '𛰫',
338            Duployan::LetterNMS => '𛰬',
339            Duployan::LetterJMS => '𛰭',
340            Duployan::LetterSJS => '𛰮',
341            Duployan::LetterJSWithDot => '𛰯',
342            Duployan::LetterJN => '𛰰',
343            Duployan::LetterJNS => '𛰱',
344            Duployan::LetterST => '𛰲',
345            Duployan::LetterSTR => '𛰳',
346            Duployan::LetterSP => '𛰴',
347            Duployan::LetterSPR => '𛰵',
348            Duployan::LetterTS => '𛰶',
349            Duployan::LetterTRS => '𛰷',
350            Duployan::LetterW => '𛰸',
351            Duployan::LetterWh => '𛰹',
352            Duployan::LetterWR => '𛰺',
353            Duployan::LetterSN => '𛰻',
354            Duployan::LetterSM => '𛰼',
355            Duployan::LetterKRS => '𛰽',
356            Duployan::LetterGRS => '𛰾',
357            Duployan::LetterSK => '𛰿',
358            Duployan::LetterSKR => '𛱀',
359            Duployan::LetterA => '𛱁',
360            Duployan::LetterSloanOw => '𛱂',
361            Duployan::LetterOa => '𛱃',
362            Duployan::LetterO => '𛱄',
363            Duployan::LetterAou => '𛱅',
364            Duployan::LetterI => '𛱆',
365            Duployan::LetterE => '𛱇',
366            Duployan::LetterIe => '𛱈',
367            Duployan::LetterShortI => '𛱉',
368            Duployan::LetterUi => '𛱊',
369            Duployan::LetterEe => '𛱋',
370            Duployan::LetterSloanEh => '𛱌',
371            Duployan::LetterRomanianI => '𛱍',
372            Duployan::LetterSloanEe => '𛱎',
373            Duployan::LetterLongI => '𛱏',
374            Duployan::LetterYe => '𛱐',
375            Duployan::LetterU => '𛱑',
376            Duployan::LetterEu => '𛱒',
377            Duployan::LetterXw => '𛱓',
378            Duployan::LetterUN => '𛱔',
379            Duployan::LetterLongU => '𛱕',
380            Duployan::LetterRomanianU => '𛱖',
381            Duployan::LetterUh => '𛱗',
382            Duployan::LetterSloanU => '𛱘',
383            Duployan::LetterOoh => '𛱙',
384            Duployan::LetterOw => '𛱚',
385            Duployan::LetterOu => '𛱛',
386            Duployan::LetterWa => '𛱜',
387            Duployan::LetterWo => '𛱝',
388            Duployan::LetterWi => '𛱞',
389            Duployan::LetterWei => '𛱟',
390            Duployan::LetterWow => '𛱠',
391            Duployan::LetterNasalU => '𛱡',
392            Duployan::LetterNasalO => '𛱢',
393            Duployan::LetterNasalI => '𛱣',
394            Duployan::LetterNasalA => '𛱤',
395            Duployan::LetterPerninAn => '𛱥',
396            Duployan::LetterPerninAm => '𛱦',
397            Duployan::LetterSloanEn => '𛱧',
398            Duployan::LetterSloanAn => '𛱨',
399            Duployan::LetterSloanOn => '𛱩',
400            Duployan::LetterVocalicM => '𛱪',
401            Duployan::AffixLeftHorizontalSecant => '𛱰',
402            Duployan::AffixMidHorizontalSecant => '𛱱',
403            Duployan::AffixRightHorizontalSecant => '𛱲',
404            Duployan::AffixLowVerticalSecant => '𛱳',
405            Duployan::AffixMidVerticalSecant => '𛱴',
406            Duployan::AffixHighVerticalSecant => '𛱵',
407            Duployan::AffixAttachedSecant => '𛱶',
408            Duployan::AffixAttachedLeftDashToDashRightSecant => '𛱷',
409            Duployan::AffixAttachedTangent => '𛱸',
410            Duployan::AffixAttachedTail => '𛱹',
411            Duployan::AffixAttachedEHook => '𛱺',
412            Duployan::AffixAttachedIHook => '𛱻',
413            Duployan::AffixAttachedTangentHook => '𛱼',
414            Duployan::AffixHighAcute => '𛲀',
415            Duployan::AffixHighTightAcute => '𛲁',
416            Duployan::AffixHighGrave => '𛲂',
417            Duployan::AffixHighLongGrave => '𛲃',
418            Duployan::AffixHighDot => '𛲄',
419            Duployan::AffixHighCircle => '𛲅',
420            Duployan::AffixHighLine => '𛲆',
421            Duployan::AffixHighWave => '𛲇',
422            Duployan::AffixHighVertical => '𛲈',
423            Duployan::AffixLowAcute => '𛲐',
424            Duployan::AffixLowTightAcute => '𛲑',
425            Duployan::AffixLowGrave => '𛲒',
426            Duployan::AffixLowLongGrave => '𛲓',
427            Duployan::AffixLowDot => '𛲔',
428            Duployan::AffixLowCircle => '𛲕',
429            Duployan::AffixLowLine => '𛲖',
430            Duployan::AffixLowWave => '𛲗',
431            Duployan::AffixLowVertical => '𛲘',
432            Duployan::AffixLowArrow => '𛲙',
433            Duployan::SignOWithCross => '𛲜',
434            Duployan::ThickLetterSelector => '𛲝',
435            Duployan::DoubleMark => '𛲞',
436        }
437    }
438}
439
440impl std::convert::TryFrom<char> for Duployan {
441    type Error = ();
442    fn try_from(c: char) -> Result<Self, Self::Error> {
443        match c {
444            '𛰀' => Ok(Duployan::LetterH),
445            '𛰁' => Ok(Duployan::LetterX),
446            '𛰂' => Ok(Duployan::LetterP),
447            '𛰃' => Ok(Duployan::LetterT),
448            '𛰄' => Ok(Duployan::LetterF),
449            '𛰅' => Ok(Duployan::LetterK),
450            '𛰆' => Ok(Duployan::LetterL),
451            '𛰇' => Ok(Duployan::LetterB),
452            '𛰈' => Ok(Duployan::LetterD),
453            '𛰉' => Ok(Duployan::LetterV),
454            '𛰊' => Ok(Duployan::LetterG),
455            '𛰋' => Ok(Duployan::LetterR),
456            '𛰌' => Ok(Duployan::LetterPN),
457            '𛰍' => Ok(Duployan::LetterDS),
458            '𛰎' => Ok(Duployan::LetterFN),
459            '𛰏' => Ok(Duployan::LetterKM),
460            '𛰐' => Ok(Duployan::LetterRS),
461            '𛰑' => Ok(Duployan::LetterTh),
462            '𛰒' => Ok(Duployan::LetterSloanDh),
463            '𛰓' => Ok(Duployan::LetterDh),
464            '𛰔' => Ok(Duployan::LetterKk),
465            '𛰕' => Ok(Duployan::LetterSloanJ),
466            '𛰖' => Ok(Duployan::LetterHl),
467            '𛰗' => Ok(Duployan::LetterLh),
468            '𛰘' => Ok(Duployan::LetterRh),
469            '𛰙' => Ok(Duployan::LetterM),
470            '𛰚' => Ok(Duployan::LetterN),
471            '𛰛' => Ok(Duployan::LetterJ),
472            '𛰜' => Ok(Duployan::LetterS),
473            '𛰝' => Ok(Duployan::LetterMN),
474            '𛰞' => Ok(Duployan::LetterNM),
475            '𛰟' => Ok(Duployan::LetterJM),
476            '𛰠' => Ok(Duployan::LetterSJ),
477            '𛰡' => Ok(Duployan::LetterMWithDot),
478            '𛰢' => Ok(Duployan::LetterNWithDot),
479            '𛰣' => Ok(Duployan::LetterJWithDot),
480            '𛰤' => Ok(Duployan::LetterJWithDotsInsideAndAbove),
481            '𛰥' => Ok(Duployan::LetterSWithDot),
482            '𛰦' => Ok(Duployan::LetterSWithDotBelow),
483            '𛰧' => Ok(Duployan::LetterMS),
484            '𛰨' => Ok(Duployan::LetterNS),
485            '𛰩' => Ok(Duployan::LetterJS),
486            '𛰪' => Ok(Duployan::LetterSS),
487            '𛰫' => Ok(Duployan::LetterMNS),
488            '𛰬' => Ok(Duployan::LetterNMS),
489            '𛰭' => Ok(Duployan::LetterJMS),
490            '𛰮' => Ok(Duployan::LetterSJS),
491            '𛰯' => Ok(Duployan::LetterJSWithDot),
492            '𛰰' => Ok(Duployan::LetterJN),
493            '𛰱' => Ok(Duployan::LetterJNS),
494            '𛰲' => Ok(Duployan::LetterST),
495            '𛰳' => Ok(Duployan::LetterSTR),
496            '𛰴' => Ok(Duployan::LetterSP),
497            '𛰵' => Ok(Duployan::LetterSPR),
498            '𛰶' => Ok(Duployan::LetterTS),
499            '𛰷' => Ok(Duployan::LetterTRS),
500            '𛰸' => Ok(Duployan::LetterW),
501            '𛰹' => Ok(Duployan::LetterWh),
502            '𛰺' => Ok(Duployan::LetterWR),
503            '𛰻' => Ok(Duployan::LetterSN),
504            '𛰼' => Ok(Duployan::LetterSM),
505            '𛰽' => Ok(Duployan::LetterKRS),
506            '𛰾' => Ok(Duployan::LetterGRS),
507            '𛰿' => Ok(Duployan::LetterSK),
508            '𛱀' => Ok(Duployan::LetterSKR),
509            '𛱁' => Ok(Duployan::LetterA),
510            '𛱂' => Ok(Duployan::LetterSloanOw),
511            '𛱃' => Ok(Duployan::LetterOa),
512            '𛱄' => Ok(Duployan::LetterO),
513            '𛱅' => Ok(Duployan::LetterAou),
514            '𛱆' => Ok(Duployan::LetterI),
515            '𛱇' => Ok(Duployan::LetterE),
516            '𛱈' => Ok(Duployan::LetterIe),
517            '𛱉' => Ok(Duployan::LetterShortI),
518            '𛱊' => Ok(Duployan::LetterUi),
519            '𛱋' => Ok(Duployan::LetterEe),
520            '𛱌' => Ok(Duployan::LetterSloanEh),
521            '𛱍' => Ok(Duployan::LetterRomanianI),
522            '𛱎' => Ok(Duployan::LetterSloanEe),
523            '𛱏' => Ok(Duployan::LetterLongI),
524            '𛱐' => Ok(Duployan::LetterYe),
525            '𛱑' => Ok(Duployan::LetterU),
526            '𛱒' => Ok(Duployan::LetterEu),
527            '𛱓' => Ok(Duployan::LetterXw),
528            '𛱔' => Ok(Duployan::LetterUN),
529            '𛱕' => Ok(Duployan::LetterLongU),
530            '𛱖' => Ok(Duployan::LetterRomanianU),
531            '𛱗' => Ok(Duployan::LetterUh),
532            '𛱘' => Ok(Duployan::LetterSloanU),
533            '𛱙' => Ok(Duployan::LetterOoh),
534            '𛱚' => Ok(Duployan::LetterOw),
535            '𛱛' => Ok(Duployan::LetterOu),
536            '𛱜' => Ok(Duployan::LetterWa),
537            '𛱝' => Ok(Duployan::LetterWo),
538            '𛱞' => Ok(Duployan::LetterWi),
539            '𛱟' => Ok(Duployan::LetterWei),
540            '𛱠' => Ok(Duployan::LetterWow),
541            '𛱡' => Ok(Duployan::LetterNasalU),
542            '𛱢' => Ok(Duployan::LetterNasalO),
543            '𛱣' => Ok(Duployan::LetterNasalI),
544            '𛱤' => Ok(Duployan::LetterNasalA),
545            '𛱥' => Ok(Duployan::LetterPerninAn),
546            '𛱦' => Ok(Duployan::LetterPerninAm),
547            '𛱧' => Ok(Duployan::LetterSloanEn),
548            '𛱨' => Ok(Duployan::LetterSloanAn),
549            '𛱩' => Ok(Duployan::LetterSloanOn),
550            '𛱪' => Ok(Duployan::LetterVocalicM),
551            '𛱰' => Ok(Duployan::AffixLeftHorizontalSecant),
552            '𛱱' => Ok(Duployan::AffixMidHorizontalSecant),
553            '𛱲' => Ok(Duployan::AffixRightHorizontalSecant),
554            '𛱳' => Ok(Duployan::AffixLowVerticalSecant),
555            '𛱴' => Ok(Duployan::AffixMidVerticalSecant),
556            '𛱵' => Ok(Duployan::AffixHighVerticalSecant),
557            '𛱶' => Ok(Duployan::AffixAttachedSecant),
558            '𛱷' => Ok(Duployan::AffixAttachedLeftDashToDashRightSecant),
559            '𛱸' => Ok(Duployan::AffixAttachedTangent),
560            '𛱹' => Ok(Duployan::AffixAttachedTail),
561            '𛱺' => Ok(Duployan::AffixAttachedEHook),
562            '𛱻' => Ok(Duployan::AffixAttachedIHook),
563            '𛱼' => Ok(Duployan::AffixAttachedTangentHook),
564            '𛲀' => Ok(Duployan::AffixHighAcute),
565            '𛲁' => Ok(Duployan::AffixHighTightAcute),
566            '𛲂' => Ok(Duployan::AffixHighGrave),
567            '𛲃' => Ok(Duployan::AffixHighLongGrave),
568            '𛲄' => Ok(Duployan::AffixHighDot),
569            '𛲅' => Ok(Duployan::AffixHighCircle),
570            '𛲆' => Ok(Duployan::AffixHighLine),
571            '𛲇' => Ok(Duployan::AffixHighWave),
572            '𛲈' => Ok(Duployan::AffixHighVertical),
573            '𛲐' => Ok(Duployan::AffixLowAcute),
574            '𛲑' => Ok(Duployan::AffixLowTightAcute),
575            '𛲒' => Ok(Duployan::AffixLowGrave),
576            '𛲓' => Ok(Duployan::AffixLowLongGrave),
577            '𛲔' => Ok(Duployan::AffixLowDot),
578            '𛲕' => Ok(Duployan::AffixLowCircle),
579            '𛲖' => Ok(Duployan::AffixLowLine),
580            '𛲗' => Ok(Duployan::AffixLowWave),
581            '𛲘' => Ok(Duployan::AffixLowVertical),
582            '𛲙' => Ok(Duployan::AffixLowArrow),
583            '𛲜' => Ok(Duployan::SignOWithCross),
584            '𛲝' => Ok(Duployan::ThickLetterSelector),
585            '𛲞' => Ok(Duployan::DoubleMark),
586            _ => Err(()),
587        }
588    }
589}
590
591impl Into<u32> for Duployan {
592    fn into(self) -> u32 {
593        let c: char = self.into();
594        let hex = c
595            .escape_unicode()
596            .to_string()
597            .replace("\\u{", "")
598            .replace("}", "");
599        u32::from_str_radix(&hex, 16).unwrap()
600    }
601}
602
603impl std::convert::TryFrom<u32> for Duployan {
604    type Error = ();
605    fn try_from(u: u32) -> Result<Self, Self::Error> {
606        if let Ok(c) = char::try_from(u) {
607            Self::try_from(c)
608        } else {
609            Err(())
610        }
611    }
612}
613
614impl Iterator for Duployan {
615    type Item = Self;
616    fn next(&mut self) -> Option<Self> {
617        let index: u32 = (*self).into();
618        use std::convert::TryFrom;
619        Self::try_from(index + 1).ok()
620    }
621}
622
623impl Duployan {
624    /// The character with the lowest index in this unicode block
625    pub fn new() -> Self {
626        Duployan::LetterH
627    }
628
629    /// The character's name, in sentence case
630    pub fn name(&self) -> String {
631        let s = std::format!("Duployan{:#?}", self);
632        string_morph::to_sentence_case(&s)
633    }
634}