1use crate::unicode::ucd::property_names;
2
3#[derive(Clone, Copy)]
4pub struct PropertyName {
5 pub full: &'static str,
6 pub abbr: &'static str,
7}
8
9pub trait UnicodeProperty {
28 fn property_value_name(&self) -> PropertyName;
29}
30
31#[derive(Debug, PartialEq, Clone, Copy)]
32#[repr(u8)]
33pub enum BinaryProperty {
34 Y,
35 N,
36}
37
38impl From<bool> for BinaryProperty {
39 fn from(val: bool) -> Self {
40 match val {
41 true => BinaryProperty::Y,
42 false => BinaryProperty::N,
43 }
44 }
45}
46
47impl UnicodeProperty for BinaryProperty {
48 fn property_value_name(&self) -> PropertyName {
49 property_names::binary_property_name(*self)
50 }
51}
52
53#[derive(Debug, PartialEq, Clone, Copy)]
55#[repr(u8)]
56pub enum Gc {
57 Cc,
59 Cf,
60 Cn,
61 Co,
62 Cs,
63 Ll,
66 Lm,
67 Lo,
68 Lt,
69 Lu,
70 Mc,
72 Me,
73 Mn,
74 Nd,
76 Nl,
77 No,
78 Pc,
80 Pd,
81 Pe,
82 Pf,
83 Pi,
84 Po,
85 Ps,
86 Sc,
88 Sk,
89 Sm,
90 So,
91 Zl,
93 Zp,
94 Zs,
95}
96
97impl UnicodeProperty for Gc {
98 fn property_value_name(&self) -> PropertyName {
99 property_names::gc_name(*self)
100 }
101}
102
103#[derive(Debug, PartialEq, Clone, Copy)]
105#[repr(u8)]
106pub enum Hst {
107 L, LV, LVT, NA, T, V, }
114
115impl UnicodeProperty for Hst {
116 fn property_value_name(&self) -> PropertyName {
117 property_names::hst_name(*self)
118 }
119}
120
121#[derive(Debug, PartialEq, Clone, Copy)]
123#[repr(u8)]
124pub enum Gcb {
125 CN, CR, EB, EBG, EM, EX, GAZ, L, LF, LV, LVT, PP, RI, SM, T, V, XX, ZWJ, }
144
145impl UnicodeProperty for Gcb {
146 fn property_value_name(&self) -> PropertyName {
147 property_names::gcb_name(*self)
148 }
149}
150
151#[derive(Debug, PartialEq, Clone, Copy)]
153#[repr(u8)]
154pub enum Bc {
155 AL, AN, B, BN, CS, EN, ES, ET, FSI, L, LRE, LRI, LRO, NSM, ON, PDF, PDI, R, RLE, RLI, RLO, S, WS, }
179
180impl UnicodeProperty for Bc {
181 fn property_value_name(&self) -> PropertyName {
182 property_names::bc_name(*self)
183 }
184}
185
186#[derive(Debug, PartialEq, Clone, Copy)]
188#[repr(u8)]
189pub enum Ccc {
190 NR = 0, OV = 1, HANR = 6, NK = 7, KV = 8, VR = 9, CCC10 = 10, CCC11 = 11, CCC12 = 12, CCC13 = 13, CCC14 = 14, CCC15 = 15, CCC16 = 16, CCC17 = 17, CCC18 = 18, CCC19 = 19, CCC20 = 20, CCC21 = 21, CCC22 = 22, CCC23 = 23, CCC24 = 24, CCC25 = 25, CCC26 = 26, CCC27 = 27, CCC28 = 28, CCC29 = 29, CCC30 = 30, CCC31 = 31, CCC32 = 32, CCC33 = 33, CCC34 = 34, CCC35 = 35, CCC36 = 36, CCC84 = 84, CCC91 = 91, CCC103 = 103, CCC107 = 107, CCC118 = 118, CCC122 = 122, CCC129 = 129, CCC130 = 130, CCC132 = 132, CCC133 = 133, ATBL = 200, ATB = 202, ATA = 214, ATAR = 216, BL = 218, B = 220, BR = 222, L = 224, R = 226, AL = 228, A = 230, AR = 232, DB = 233, DA = 234, IS = 240, }
249
250impl UnicodeProperty for Ccc {
251 fn property_value_name(&self) -> PropertyName {
252 property_names::ccc_name(*self)
253 }
254}
255
256#[derive(Debug, PartialEq, Clone, Copy)]
258#[repr(u8)]
259pub enum Dt {
260 Can, Com, Enc, Fin, Font, Fra, Init, Iso, Med, Nar, Nb, None, Sml, Sqr, Sub, Sup, Vert, Wide, }
279
280impl UnicodeProperty for Dt {
281 fn property_value_name(&self) -> PropertyName {
282 property_names::dt_name(*self)
283 }
284}
285
286#[derive(Debug, PartialEq, Clone, Copy)]
288#[repr(u16)]
289pub enum Blk {
290 Adlam,
292 AegeanNumbers,
293 Ahom,
294 Alchemical,
295 AlphabeticPf,
296 AnatolianHieroglyphs,
297 AncientGreekMusic,
298 AncientGreekNumbers,
299 AncientSymbols,
300 Arabic,
301 ArabicExtA,
302 ArabicExtB,
303 ArabicExtC,
304 ArabicMath,
305 ArabicPfA,
306 ArabicPfB,
307 ArabicSup,
308 Armenian,
309 Arrows,
310 Ascii,
311 Avestan,
312 Balinese,
313 Bamum,
314 BamumSup,
315 BassaVah,
316 Batak,
317 Bengali,
318 Bhaiksuki,
319 BlockElements,
320 Bopomofo,
321 BopomofoExt,
322 BoxDrawing,
323 Brahmi,
324 Braille,
325 Buginese,
326 Buhid,
327 ByzantineMusic,
328 Carian,
329 CaucasianAlbanian,
330 Chakma,
331 Cham,
332 Cherokee,
333 CherokeeSup,
334 ChessSymbols,
335 Chorasmian,
336 Cjk,
337 CjkCompat,
338 CjkCompatForms,
339 CjkCompatIdeographs,
340 CjkCompatIdeographsSup,
341 CjkExtA,
342 CjkExtB,
343 CjkExtC,
344 CjkExtD,
345 CjkExtE,
346 CjkExtF,
347 CjkExtG,
348 CjkExtH,
349 CjkExtI,
350 CjkRadicalsSup,
351 CjkStrokes,
352 CjkSymbols,
353 CompatJamo,
354 ControlPictures,
355 Coptic,
356 CopticEpactNumbers,
357 CountingRod,
358 Cuneiform,
359 CuneiformNumbers,
360 CurrencySymbols,
361 CypriotSyllabary,
362 CyproMinoan,
363 Cyrillic,
364 CyrillicExtA,
365 CyrillicExtB,
366 CyrillicExtC,
367 CyrillicExtD,
368 CyrillicSup,
369 Deseret,
370 Devanagari,
371 DevanagariExt,
372 DevanagariExtA,
373 Diacriticals,
374 DiacriticalsExt,
375 DiacriticalsForSymbols,
376 DiacriticalsSup,
377 Dingbats,
378 DivesAkuru,
379 Dogra,
380 Domino,
381 Duployan,
382 EarlyDynasticCuneiform,
383 EgyptianHieroglyphFormatControls,
384 EgyptianHieroglyphs,
385 EgyptianHieroglyphsExtA,
386 Elbasan,
387 Elymaic,
388 Emoticons,
389 EnclosedAlphanum,
390 EnclosedAlphanumSup,
391 EnclosedCjk,
392 EnclosedIdeographicSup,
393 Ethiopic,
394 EthiopicExt,
395 EthiopicExtA,
396 EthiopicExtB,
397 EthiopicSup,
398 Garay,
399 GeometricShapes,
400 GeometricShapesExt,
401 Georgian,
402 GeorgianExt,
403 GeorgianSup,
404 Glagolitic,
405 GlagoliticSup,
406 Gothic,
407 Grantha,
408 Greek,
409 GreekExt,
410 Gujarati,
411 GunjalaGondi,
412 Gurmukhi,
413 GurungKhema,
414 HalfAndFullForms,
415 HalfMarks,
416 Hangul,
417 HanifiRohingya,
418 Hanunoo,
419 Hatran,
420 Hebrew,
421 HighPuSurrogates,
422 HighSurrogates,
423 Hiragana,
424 Idc,
425 IdeographicSymbols,
426 ImperialAramaic,
427 IndicNumberForms,
428 IndicSiyaqNumbers,
429 InscriptionalPahlavi,
430 InscriptionalParthian,
431 IpaExt,
432 Jamo,
433 JamoExtA,
434 JamoExtB,
435 Javanese,
436 Kaithi,
437 KaktovikNumerals,
438 KanaExtA,
439 KanaExtB,
440 KanaSup,
441 Kanbun,
442 Kangxi,
443 Kannada,
444 Katakana,
445 KatakanaExt,
446 Kawi,
447 KayahLi,
448 Kharoshthi,
449 KhitanSmallScript,
450 Khmer,
451 KhmerSymbols,
452 Khojki,
453 Khudawadi,
454 KiratRai,
455 Lao,
456 Latin1Sup,
457 LatinExtA,
458 LatinExtAdditional,
459 LatinExtB,
460 LatinExtC,
461 LatinExtD,
462 LatinExtE,
463 LatinExtF,
464 LatinExtG,
465 Lepcha,
466 LetterlikeSymbols,
467 Limbu,
468 LinearA,
469 LinearBIdeograms,
470 LinearBSyllabary,
471 Lisu,
472 LisuSup,
473 LowSurrogates,
474 Lycian,
475 Lydian,
476 Mahajani,
477 Mahjong,
478 Makasar,
479 Malayalam,
480 Mandaic,
481 Manichaean,
482 Marchen,
483 MasaramGondi,
484 MathAlphanum,
485 MathOperators,
486 MayanNumerals,
487 Medefaidrin,
488 MeeteiMayek,
489 MeeteiMayekExt,
490 MendeKikakui,
491 MeroiticCursive,
492 MeroiticHieroglyphs,
493 Miao,
494 MiscArrows,
495 MiscMathSymbolsA,
496 MiscMathSymbolsB,
497 MiscPictographs,
498 MiscSymbols,
499 MiscTechnical,
500 Modi,
501 ModifierLetters,
502 ModifierToneLetters,
503 Mongolian,
504 MongolianSup,
505 Mro,
506 Multani,
507 Music,
508 Myanmar,
509 MyanmarExtA,
510 MyanmarExtB,
511 MyanmarExtC,
512 Nabataean,
513 NagMundari,
514 Nandinagari,
515 Nb,
516 NewTaiLue,
517 Newa,
518 Nko,
519 NumberForms,
520 Nushu,
521 NyiakengPuachueHmong,
522 Ocr,
523 Ogham,
524 OlChiki,
525 OlOnal,
526 OldHungarian,
527 OldItalic,
528 OldNorthArabian,
529 OldPermic,
530 OldPersian,
531 OldSogdian,
532 OldSouthArabian,
533 OldTurkic,
534 OldUyghur,
535 Oriya,
536 OrnamentalDingbats,
537 Osage,
538 Osmanya,
539 OttomanSiyaqNumbers,
540 PahawhHmong,
541 Palmyrene,
542 PauCinHau,
543 PhagsPa,
544 Phaistos,
545 Phoenician,
546 PhoneticExt,
547 PhoneticExtSup,
548 PlayingCards,
549 PsalterPahlavi,
550 Pua,
551 Punctuation,
552 Rejang,
553 Rumi,
554 Runic,
555 Samaritan,
556 Saurashtra,
557 Sharada,
558 Shavian,
559 ShorthandFormatControls,
560 Siddham,
561 Sinhala,
562 SinhalaArchaicNumbers,
563 SmallForms,
564 SmallKanaExt,
565 Sogdian,
566 SoraSompeng,
567 Soyombo,
568 Specials,
569 Sundanese,
570 SundaneseSup,
571 Sunuwar,
572 SupArrowsA,
573 SupArrowsB,
574 SupArrowsC,
575 SupMathOperators,
576 SupPuaA,
577 SupPuaB,
578 SupPunctuation,
579 SupSymbolsAndPictographs,
580 SuperAndSub,
581 SuttonSignwriting,
582 SylotiNagri,
583 SymbolsAndPictographsExtA,
584 SymbolsForLegacyComputing,
585 SymbolsForLegacyComputingSup,
586 Syriac,
587 SyriacSup,
588 Tagalog,
589 Tagbanwa,
590 Tags,
591 TaiLe,
592 TaiTham,
593 TaiViet,
594 TaiXuanJing,
595 Takri,
596 Tamil,
597 TamilSup,
598 Tangsa,
599 Tangut,
600 TangutComponents,
601 TangutSup,
602 Telugu,
603 Thaana,
604 Thai,
605 Tibetan,
606 Tifinagh,
607 Tirhuta,
608 Todhri,
609 Toto,
610 TransportAndMap,
611 TuluTigalari,
612 Ucas,
613 UcasExt,
614 UcasExtA,
615 Ugaritic,
616 Vai,
617 VedicExt,
618 VerticalForms,
619 Vithkuqi,
620 Vs,
621 VsSup,
622 Wancho,
623 WarangCiti,
624 Yezidi,
625 YiRadicals,
626 YiSyllables,
627 Yijing,
628 ZanabazarSquare,
629 ZnamennyMusic,
630}
631
632impl UnicodeProperty for Blk {
633 fn property_value_name(&self) -> PropertyName {
634 property_names::blk_name(*self)
635 }
636}
637
638#[derive(Debug, PartialEq, Clone, Copy)]
640#[repr(u8)]
641pub enum Sc {
642 Adlm,
644 Aghb,
645 Ahom,
646 Arab,
647 Armi,
648 Armn,
649 Avst,
650 Bali,
651 Bamu,
652 Bass,
653 Batk,
654 Beng,
655 Bhks,
656 Bopo,
657 Brah,
658 Brai,
659 Bugi,
660 Buhd,
661 Cakm,
662 Cans,
663 Cari,
664 Cham,
665 Cher,
666 Chrs,
667 Copt,
668 Cpmn,
669 Cprt,
670 Cyrl,
671 Deva,
672 Diak,
673 Dogr,
674 Dsrt,
675 Dupl,
676 Egyp,
677 Elba,
678 Elym,
679 Ethi,
680 Gara,
681 Geor,
682 Glag,
683 Gong,
684 Gonm,
685 Goth,
686 Gran,
687 Grek,
688 Gujr,
689 Gukh,
690 Guru,
691 Hang,
692 Hani,
693 Hano,
694 Hatr,
695 Hebr,
696 Hira,
697 Hluw,
698 Hmng,
699 Hmnp,
700 Hrkt,
701 Hung,
702 Ital,
703 Java,
704 Kali,
705 Kana,
706 Kawi,
707 Khar,
708 Khmr,
709 Khoj,
710 Kits,
711 Knda,
712 Krai,
713 Kthi,
714 Lana,
715 Laoo,
716 Latn,
717 Lepc,
718 Limb,
719 Lina,
720 Linb,
721 Lisu,
722 Lyci,
723 Lydi,
724 Mahj,
725 Maka,
726 Mand,
727 Mani,
728 Marc,
729 Medf,
730 Mend,
731 Merc,
732 Mero,
733 Mlym,
734 Modi,
735 Mong,
736 Mroo,
737 Mtei,
738 Mult,
739 Mymr,
740 Nagm,
741 Nand,
742 Narb,
743 Nbat,
744 Newa,
745 Nkoo,
746 Nshu,
747 Ogam,
748 Olck,
749 Onao,
750 Orkh,
751 Orya,
752 Osge,
753 Osma,
754 Ougr,
755 Palm,
756 Pauc,
757 Perm,
758 Phag,
759 Phli,
760 Phlp,
761 Phnx,
762 Plrd,
763 Prti,
764 Rjng,
765 Rohg,
766 Runr,
767 Samr,
768 Sarb,
769 Saur,
770 Sgnw,
771 Shaw,
772 Shrd,
773 Sidd,
774 Sind,
775 Sinh,
776 Sogd,
777 Sogo,
778 Sora,
779 Soyo,
780 Sund,
781 Sunu,
782 Sylo,
783 Syrc,
784 Tagb,
785 Takr,
786 Tale,
787 Talu,
788 Taml,
789 Tang,
790 Tavt,
791 Telu,
792 Tfng,
793 Tglg,
794 Thaa,
795 Thai,
796 Tibt,
797 Tirh,
798 Tnsa,
799 Todr,
800 Toto,
801 Tutg,
802 Ugar,
803 Vaii,
804 Vith,
805 Wara,
806 Wcho,
807 Xpeo,
808 Xsux,
809 Yezi,
810 Yiii,
811 Zanb,
812 Zinh,
813 Zyyy,
814 Zzzz,
815}
816
817impl UnicodeProperty for Sc {
818 fn property_value_name(&self) -> PropertyName {
819 property_names::sc_name(*self)
820 }
821}
822
823#[derive(Debug, PartialEq, Clone, Copy)]
825pub enum Age {
826 V1_1,
827 V2_0,
828 V2_1,
829 V3_0,
830 V3_1,
831 V3_2,
832 V4_0,
833 V4_1,
834 V5_0,
835 V5_1,
836 V5_2,
837 V6_0,
838 V6_1,
839 V6_2,
840 V6_3,
841 V7_0,
842 V8_0,
843 V9_0,
844 V10_0,
845 V11_0,
846 V12_0,
847 V12_1,
848 V13_0,
849 V14_0,
850 V15_0,
851 V15_1,
852 V16_0,
853 NA,
854}
855
856impl UnicodeProperty for Age {
857 fn property_value_name(&self) -> PropertyName {
858 property_names::age_name(*self)
859 }
860}
861
862#[derive(Debug, PartialEq, Clone, Copy)]
864pub enum Wb {
865 CR, DQ, EB, EBG, EM, EX, Extend, FO, GAZ, HL, KA, LE, LF, MB, ML, MN, NL, NU, RI, SQ, WSegSpace, XX, ZWJ, }
889
890impl UnicodeProperty for Wb {
891 fn property_value_name(&self) -> PropertyName {
892 property_names::wb_name(*self)
893 }
894}
895
896#[allow(non_camel_case_types)]
898#[derive(Debug, PartialEq, Clone, Copy)]
899pub enum Insc {
900 Avagraha, Bindu, Brahmi_Joining_Number, Cantillation_Mark, Consonant, Consonant_Dead, Consonant_Final, Consonant_Head_Letter, Consonant_Initial_Postfixed, Consonant_Killer, Consonant_Medial, Consonant_Placeholder, Consonant_Preceding_Repha, Consonant_Prefixed, Consonant_Subjoined, Consonant_Succeeding_Repha, Consonant_With_Stacker, Gemination_Mark, Invisible_Stacker, Joiner, Modifying_Letter, Non_Joiner, Nukta, Number, Number_Joiner, Other, Pure_Killer, Register_Shifter, Reordering_Killer, Syllable_Modifier, Tone_Letter, Tone_Mark, Virama, Visarga, Vowel, Vowel_Dependent, Vowel_Independent, }
938
939impl UnicodeProperty for Insc {
940 fn property_value_name(&self) -> PropertyName {
941 property_names::insc_name(*self)
942 }
943}
944
945#[derive(Debug, PartialEq, Clone, Copy)]
947pub enum Incb {
948 Consonant, Extend, Linker, None, }
953
954impl UnicodeProperty for Incb {
955 fn property_value_name(&self) -> PropertyName {
956 property_names::incb_name(*self)
957 }
958}