1use crate::props::*;
6use crate::provider::names::*;
7use core::marker::PhantomData;
8use icu_collections::codepointtrie::TrieValue;
9use icu_provider::marker::ErasedMarker;
10use icu_provider::prelude::*;
11use yoke::Yokeable;
12use zerotrie::cursor::ZeroTrieSimpleAsciiCursor;
13
14#[derive(#[automatically_derived]
impl<T: ::core::fmt::Debug> ::core::fmt::Debug for PropertyParser<T> {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field2_finish(f,
"PropertyParser", "map", &self.map, "markers", &&self.markers)
}
}Debug)]
61pub struct PropertyParser<T> {
62 map: DataPayload<ErasedMarker<PropertyValueNameToEnumMap<'static>>>,
63 markers: PhantomData<fn() -> T>,
64}
65
66#[derive(#[automatically_derived]
impl<'a, T: ::core::fmt::Debug> ::core::fmt::Debug for
PropertyParserBorrowed<'a, T> {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field2_finish(f,
"PropertyParserBorrowed", "map", &self.map, "markers",
&&self.markers)
}
}Debug)]
69pub struct PropertyParserBorrowed<'a, T> {
70 map: &'a PropertyValueNameToEnumMap<'a>,
71 markers: PhantomData<fn() -> T>,
72}
73
74impl<T> Clone for PropertyParserBorrowed<'_, T> {
75 fn clone(&self) -> Self {
76 *self
77 }
78}
79impl<T> Copy for PropertyParserBorrowed<'_, T> {}
80
81impl<T> PropertyParser<T> {
82 #[cfg(feature = "compiled_data")]
88 #[expect(clippy::new_ret_no_self)]
89 pub const fn new() -> PropertyParserBorrowed<'static, T>
90 where
91 T: ParseableEnumeratedProperty,
92 {
93 PropertyParserBorrowed::new()
94 }
95
96 #[doc = "A version of [`Self::new`] that uses custom data provided by a [`DataProvider`].\n\n[\u{1f4da} Help choosing a constructor](icu_provider::constructors)\n\n<div class=\"stab unstable\">\u{26a0}\u{fe0f} The bounds on <tt>provider</tt> may change over time, including in SemVer minor releases.</div>"icu_provider::gen_buffer_unstable_docs!(UNSTABLE, Self::new)]
97 pub fn try_new_unstable(
98 provider: &(impl DataProvider<T::DataMarker> + ?Sized),
99 ) -> Result<Self, DataError>
100 where
101 T: ParseableEnumeratedProperty,
102 {
103 Ok(Self {
104 map: provider.load(Default::default())?.payload.cast(),
105 markers: PhantomData,
106 })
107 }
108
109 #[inline]
114 pub fn as_borrowed(&self) -> PropertyParserBorrowed<'_, T> {
115 PropertyParserBorrowed {
116 map: self.map.get(),
117 markers: PhantomData,
118 }
119 }
120
121 #[doc(hidden)] pub fn erase(self) -> PropertyParser<u16> {
123 PropertyParser {
124 map: self.map.cast(),
125 markers: PhantomData,
126 }
127 }
128}
129
130impl<T: TrieValue> PropertyParserBorrowed<'_, T> {
131 #[inline]
153 pub fn get_strict_u16(self, name: &str) -> Option<u16> {
154 self.get_strict_u16_utf8(name.as_bytes())
155 }
156
157 #[doc(hidden)]
158 pub fn get_strict_u16_utf8(self, name: &[u8]) -> Option<u16> {
159 get_strict_u16(self.map, name)
160 }
161
162 #[inline]
184 pub fn get_strict(self, name: &str) -> Option<T> {
185 self.get_strict_utf8(name.as_bytes())
186 }
187
188 #[doc(hidden)]
189 pub fn get_strict_utf8(self, name: &[u8]) -> Option<T> {
190 T::try_from_u32(self.get_strict_u16_utf8(name)? as u32).ok()
191 }
192
193 #[inline]
219 pub fn get_loose_u16(self, name: &str) -> Option<u16> {
220 self.get_loose_u16_utf8(name.as_bytes())
221 }
222
223 #[doc(hidden)]
224 pub fn get_loose_u16_utf8(self, name: &[u8]) -> Option<u16> {
225 get_loose_u16(self.map, name)
226 }
227
228 #[inline]
254 pub fn get_loose(self, name: &str) -> Option<T> {
255 self.get_loose_utf8(name.as_bytes())
256 }
257
258 #[doc(hidden)]
259 pub fn get_loose_utf8(self, name: &[u8]) -> Option<T> {
260 T::try_from_u32(self.get_loose_u16_utf8(name)? as u32).ok()
261 }
262}
263
264#[cfg(feature = "compiled_data")]
265impl<T: ParseableEnumeratedProperty> Default for PropertyParserBorrowed<'static, T> {
266 fn default() -> Self {
267 Self::new()
268 }
269}
270
271impl<T: TrieValue> PropertyParserBorrowed<'static, T> {
272 #[cfg(feature = "compiled_data")]
278 pub const fn new() -> Self
279 where
280 T: ParseableEnumeratedProperty,
281 {
282 Self {
283 map: T::SINGLETON,
284 markers: PhantomData,
285 }
286 }
287
288 pub const fn static_to_owned(self) -> PropertyParser<T> {
293 PropertyParser {
294 map: DataPayload::from_static_ref(self.map),
295 markers: PhantomData,
296 }
297 }
298}
299
300fn get_strict_u16(payload: &PropertyValueNameToEnumMap<'_>, name: &[u8]) -> Option<u16> {
302 payload.map.get(name).and_then(|i| i.try_into().ok())
303}
304
305fn get_loose_u16(payload: &PropertyValueNameToEnumMap<'_>, name: &[u8]) -> Option<u16> {
307 fn recurse(mut cursor: ZeroTrieSimpleAsciiCursor, mut rest: &[u8]) -> Option<usize> {
308 if cursor.is_empty() {
309 return None;
310 }
311
312 let mut skip_cursor = cursor.clone();
314 skip_cursor.step(b'_');
315 if let Some(r) = recurse(skip_cursor, rest) {
316 return Some(r);
317 }
318
319 let ascii = loop {
320 let Some((&a, r)) = rest.split_first() else {
321 return cursor.take_value();
322 };
323 rest = r;
324
325 if !#[allow(non_exhaustive_omitted_patterns)] match a {
b'\t' | b'\n' | b'\x0C' | b'\r' | b' ' | 0x0B | b'_' | b'-' => true,
_ => false,
}matches!(
327 a,
328 b'\t' | b'\n' | b'\x0C' | b'\r' | b' ' | 0x0B | b'_' | b'-'
329 ) {
330 break a;
331 }
332 };
333
334 let mut cursor_clone = cursor.clone();
336 cursor_clone.step(ascii);
337 if let Some(r) = recurse(cursor_clone, rest) {
338 return Some(r);
339 }
340
341 let other_case = if ascii.is_ascii_lowercase() {
343 ascii.to_ascii_uppercase()
344 } else {
345 ascii.to_ascii_lowercase()
346 };
347
348 if other_case != ascii {
350 cursor.step(other_case);
351 return recurse(cursor, rest);
352 }
353
354 None
355 }
356
357 recurse(payload.map.cursor(), name).and_then(|i| i.try_into().ok())
358}
359
360pub struct PropertyNamesLong<T: NamedEnumeratedProperty> {
381 map: DataPayload<ErasedMarker<T::DataStructLong>>,
382}
383
384impl<T: NamedEnumeratedProperty> core::fmt::Debug for PropertyNamesLong<T> {
385 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
386 f.debug_struct("PropertyNamesLong")
387 .finish()
389 }
390}
391
392#[derive(#[automatically_derived]
impl<'a, T: ::core::fmt::Debug + NamedEnumeratedProperty> ::core::fmt::Debug
for PropertyNamesLongBorrowed<'a, T> where
T::DataStructLongBorrowed<'a>: ::core::fmt::Debug {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field1_finish(f,
"PropertyNamesLongBorrowed", "map", &&self.map)
}
}Debug)]
395pub struct PropertyNamesLongBorrowed<'a, T: NamedEnumeratedProperty> {
396 map: &'a T::DataStructLongBorrowed<'a>,
397}
398
399impl<T: NamedEnumeratedProperty> Clone for PropertyNamesLongBorrowed<'_, T> {
400 fn clone(&self) -> Self {
401 *self
402 }
403}
404impl<T: NamedEnumeratedProperty> Copy for PropertyNamesLongBorrowed<'_, T> {}
405
406impl<T: NamedEnumeratedProperty> PropertyNamesLong<T> {
407 #[cfg(feature = "compiled_data")]
413 #[expect(clippy::new_ret_no_self)]
414 pub const fn new() -> PropertyNamesLongBorrowed<'static, T> {
415 PropertyNamesLongBorrowed::new()
416 }
417
418 #[doc = "A version of [`Self::new`] that uses custom data provided by a [`DataProvider`].\n\n[\u{1f4da} Help choosing a constructor](icu_provider::constructors)\n\n<div class=\"stab unstable\">\u{26a0}\u{fe0f} The bounds on <tt>provider</tt> may change over time, including in SemVer minor releases.</div>"icu_provider::gen_buffer_unstable_docs!(UNSTABLE, Self::new)]
419 pub fn try_new_unstable(
420 provider: &(impl DataProvider<T::DataMarkerLong> + ?Sized),
421 ) -> Result<Self, DataError> {
422 Ok(Self {
423 map: provider.load(Default::default())?.payload.cast(),
424 })
425 }
426
427 #[inline]
432 pub fn as_borrowed(&self) -> PropertyNamesLongBorrowed<'_, T> {
433 PropertyNamesLongBorrowed {
434 map: T::nep_long_identity(self.map.get()),
435 }
436 }
437}
438
439impl<'a, T: NamedEnumeratedProperty> PropertyNamesLongBorrowed<'a, T> {
440 #[inline]
459 pub fn get(self, property: T) -> Option<&'a str> {
460 self.map.get(property.to_u32())
461 }
462}
463
464#[cfg(feature = "compiled_data")]
465impl<T: NamedEnumeratedProperty> Default for PropertyNamesLongBorrowed<'static, T> {
466 fn default() -> Self {
467 Self::new()
468 }
469}
470
471impl<T: NamedEnumeratedProperty> PropertyNamesLongBorrowed<'static, T> {
472 #[cfg(feature = "compiled_data")]
478 pub const fn new() -> Self {
479 Self {
480 map: T::SINGLETON_LONG,
481 }
482 }
483
484 pub fn static_to_owned(self) -> PropertyNamesLong<T> {
492 PropertyNamesLong {
493 map: DataPayload::from_static_ref(T::nep_long_identity_static(self.map)),
494 }
495 }
496}
497
498pub struct PropertyNamesShort<T: NamedEnumeratedProperty> {
513 map: DataPayload<ErasedMarker<T::DataStructShort>>,
514}
515
516impl<T: NamedEnumeratedProperty> core::fmt::Debug for PropertyNamesShort<T> {
517 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
518 f.debug_struct("PropertyNamesShort")
519 .finish()
521 }
522}
523
524#[derive(#[automatically_derived]
impl<'a, T: ::core::fmt::Debug + NamedEnumeratedProperty> ::core::fmt::Debug
for PropertyNamesShortBorrowed<'a, T> where
T::DataStructShortBorrowed<'a>: ::core::fmt::Debug {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field1_finish(f,
"PropertyNamesShortBorrowed", "map", &&self.map)
}
}Debug)]
527pub struct PropertyNamesShortBorrowed<'a, T: NamedEnumeratedProperty> {
528 map: &'a T::DataStructShortBorrowed<'a>,
529}
530
531impl<T: NamedEnumeratedProperty> Clone for PropertyNamesShortBorrowed<'_, T> {
532 fn clone(&self) -> Self {
533 *self
534 }
535}
536
537impl<T: NamedEnumeratedProperty> Copy for PropertyNamesShortBorrowed<'_, T> {}
538
539impl<T: NamedEnumeratedProperty> PropertyNamesShort<T> {
540 #[cfg(feature = "compiled_data")]
546 #[expect(clippy::new_ret_no_self)]
547 pub const fn new() -> PropertyNamesShortBorrowed<'static, T> {
548 PropertyNamesShortBorrowed::new()
549 }
550
551 #[doc = "A version of [`Self::new`] that uses custom data provided by a [`DataProvider`].\n\n[\u{1f4da} Help choosing a constructor](icu_provider::constructors)\n\n<div class=\"stab unstable\">\u{26a0}\u{fe0f} The bounds on <tt>provider</tt> may change over time, including in SemVer minor releases.</div>"icu_provider::gen_buffer_unstable_docs!(UNSTABLE, Self::new)]
552 pub fn try_new_unstable(
553 provider: &(impl DataProvider<T::DataMarkerShort> + ?Sized),
554 ) -> Result<Self, DataError> {
555 Ok(Self {
556 map: provider.load(Default::default())?.payload.cast(),
557 })
558 }
559
560 #[inline]
565 pub fn as_borrowed(&self) -> PropertyNamesShortBorrowed<'_, T> {
566 PropertyNamesShortBorrowed {
567 map: T::nep_short_identity(self.map.get()),
568 }
569 }
570}
571
572impl<'a, T: NamedEnumeratedProperty> PropertyNamesShortBorrowed<'a, T> {
573 #[inline]
586 pub fn get(self, property: T) -> Option<&'a str> {
587 self.map.get(property.to_u32())
588 }
589}
590
591impl PropertyNamesShortBorrowed<'_, Script> {
592 #[inline]
631 pub fn get_locale_script(self, property: Script) -> Option<icu_locale_core::subtags::Script> {
632 let prop = usize::try_from(property.to_u32()).ok()?;
633 self.map.map.get(prop).and_then(|o| o.0)
634 }
635}
636
637#[cfg(feature = "compiled_data")]
638impl<T: NamedEnumeratedProperty> Default for PropertyNamesShortBorrowed<'static, T> {
639 fn default() -> Self {
640 Self::new()
641 }
642}
643
644impl<T: NamedEnumeratedProperty> PropertyNamesShortBorrowed<'static, T> {
645 #[cfg(feature = "compiled_data")]
651 pub const fn new() -> Self {
652 Self {
653 map: T::SINGLETON_SHORT,
654 }
655 }
656
657 pub fn static_to_owned(self) -> PropertyNamesShort<T> {
665 PropertyNamesShort {
666 map: DataPayload::from_static_ref(T::nep_short_identity_static(self.map)),
667 }
668 }
669}
670
671pub trait ParseableEnumeratedProperty: crate::private::Sealed + TrieValue {
673 #[doc(hidden)]
674 type DataMarker: DataMarker<DataStruct = PropertyValueNameToEnumMap<'static>>;
675 #[doc(hidden)]
676 #[cfg(feature = "compiled_data")]
677 const SINGLETON: &'static PropertyValueNameToEnumMap<'static>;
678}
679
680pub trait PropertyEnumToValueNameLookup {
683 fn get(&self, prop: u32) -> Option<&str>;
684}
685
686impl PropertyEnumToValueNameLookup for PropertyEnumToValueNameLinearMap<'_> {
687 fn get(&self, prop: u32) -> Option<&str> {
688 self.map.get(usize::try_from(prop).ok()?)
689 }
690}
691
692#[cfg(feature = "alloc")]
693impl PropertyEnumToValueNameLookup for PropertyEnumToValueNameSparseMap<'_> {
694 fn get(&self, prop: u32) -> Option<&str> {
695 self.map.get(&u16::try_from(prop).ok()?)
696 }
697}
698
699impl PropertyEnumToValueNameLookup for PropertyScriptToIcuScriptMap<'_> {
700 fn get(&self, prop: u32) -> Option<&str> {
701 self.map
702 .get_ule_ref(usize::try_from(prop).ok()?)
703 .and_then(|no| no.as_ref())
704 .map(|s| s.as_str())
705 }
706}
707
708pub trait NamedEnumeratedProperty: ParseableEnumeratedProperty {
710 #[doc(hidden)]
711 type DataStructLong: 'static
712 + for<'a> Yokeable<'a, Output = Self::DataStructLongBorrowed<'a>>
713 + PropertyEnumToValueNameLookup;
714 #[doc(hidden)]
715 type DataStructShort: 'static
716 + for<'a> Yokeable<'a, Output = Self::DataStructShortBorrowed<'a>>
717 + PropertyEnumToValueNameLookup;
718 #[doc(hidden)]
719 type DataStructLongBorrowed<'a>: PropertyEnumToValueNameLookup;
720 #[doc(hidden)]
721 type DataStructShortBorrowed<'a>: PropertyEnumToValueNameLookup;
722 #[doc(hidden)]
723 type DataMarkerLong: DataMarker<DataStruct = Self::DataStructLong>;
724 #[doc(hidden)]
725 type DataMarkerShort: DataMarker<DataStruct = Self::DataStructShort>;
726 #[doc(hidden)]
727 #[cfg(feature = "compiled_data")]
728 const SINGLETON_LONG: &'static Self::DataStructLongBorrowed<'static>;
729 #[doc(hidden)]
730 #[cfg(feature = "compiled_data")]
731 const SINGLETON_SHORT: &'static Self::DataStructShortBorrowed<'static>;
732
733 #[doc(hidden)]
735 fn nep_long_identity<'a>(
736 stat: &'a <Self::DataStructLong as Yokeable<'a>>::Output,
737 ) -> &'a Self::DataStructLongBorrowed<'a>;
738 #[doc(hidden)]
739 fn nep_long_identity_static(
740 stat: &'static Self::DataStructLongBorrowed<'static>,
741 ) -> &'static Self::DataStructLong;
742
743 #[doc(hidden)]
744 fn nep_short_identity<'a>(
745 stat: &'a <Self::DataStructShort as Yokeable<'a>>::Output,
746 ) -> &'a Self::DataStructShortBorrowed<'a>;
747 #[doc(hidden)]
748 fn nep_short_identity_static(
749 stat: &'static Self::DataStructShortBorrowed<'static>,
750 ) -> &'static Self::DataStructShort;
751
752 #[cfg(feature = "compiled_data")]
756 fn try_from_str(s: &str) -> Option<Self> {
757 Self::try_from_utf8(s.as_bytes())
758 }
759 #[cfg(feature = "compiled_data")]
760 #[doc(hidden)]
761 fn try_from_utf8(s: &[u8]) -> Option<Self> {
762 PropertyParser::new().get_loose_utf8(s)
763 }
764 #[cfg(feature = "compiled_data")]
768 fn long_name(&self) -> &'static str {
769 PropertyNamesLong::new().get(*self).unwrap_or("unreachable")
770 }
771 #[cfg(feature = "compiled_data")]
775 fn short_name(&self) -> &'static str {
776 PropertyNamesShort::new()
777 .get(*self)
778 .unwrap_or("unreachable")
779 }
780}
781
782macro_rules! impl_value_getter {
783 (
784 impl $ty:ident {
785 $marker_n2e:ident / $singleton_n2e:ident;
786 $(
787 $(#[$meta:meta])*
788 $data_struct_s:ident / $marker_e2sn:ident / $singleton_e2sn:ident;
789 $data_struct_l:ident / $marker_e2ln:ident / $singleton_e2ln:ident;
790 )?
791 }
792 ) => {
793 impl ParseableEnumeratedProperty for $ty {
794 type DataMarker = $marker_n2e;
795 #[cfg(feature = "compiled_data")]
796 const SINGLETON: &'static PropertyValueNameToEnumMap<'static> = crate::provider::Baked::$singleton_n2e;
797 }
798
799 $(
800 $(#[$meta])*
801 impl NamedEnumeratedProperty for $ty {
802 type DataStructLong = $data_struct_l<'static>;
803 type DataStructShort = $data_struct_s<'static>;
804 type DataStructLongBorrowed<'a> = $data_struct_l<'a>;
805 type DataStructShortBorrowed<'a> = $data_struct_s<'a>;
806 type DataMarkerLong = crate::provider::$marker_e2ln;
807 type DataMarkerShort = crate::provider::$marker_e2sn;
808 #[cfg(feature = "compiled_data")]
809 const SINGLETON_LONG: &'static Self::DataStructLong = crate::provider::Baked::$singleton_e2ln;
810 #[cfg(feature = "compiled_data")]
811 const SINGLETON_SHORT: &'static Self::DataStructShort = crate::provider::Baked::$singleton_e2sn;
812 fn nep_long_identity<'a>(yoked: &'a $data_struct_l<'a>) -> &'a Self::DataStructLongBorrowed<'a> {
813 yoked
814 }
815
816 fn nep_long_identity_static(stat: &'static $data_struct_l<'static>) -> &'static $data_struct_l<'static> {
817 stat
818 }
819
820
821 fn nep_short_identity<'a>(yoked: &'a $data_struct_s<'a>) -> &'a Self::DataStructShortBorrowed<'a> {
822 yoked
823 }
824 fn nep_short_identity_static(stat: &'static $data_struct_s<'static>) -> &'static $data_struct_s<'static> {
825 stat
826 }
827
828 }
829
830
831 )?
832 };
833}
834
835impl ParseableEnumeratedProperty for BidiClass {
type DataMarker = PropertyNameParseBidiClassV1;
const SINGLETON: &'static PropertyValueNameToEnumMap<'static> =
crate::provider::Baked::SINGLETON_PROPERTY_NAME_PARSE_BIDI_CLASS_V1;
}
impl NamedEnumeratedProperty for BidiClass {
type DataStructLong = PropertyEnumToValueNameLinearMap<'static>;
type DataStructShort = PropertyEnumToValueNameLinearMap<'static>;
type DataStructLongBorrowed<'a> = PropertyEnumToValueNameLinearMap<'a>;
type DataStructShortBorrowed<'a> = PropertyEnumToValueNameLinearMap<'a>;
type DataMarkerLong = crate::provider::PropertyNameLongBidiClassV1;
type DataMarkerShort = crate::provider::PropertyNameShortBidiClassV1;
const SINGLETON_LONG: &'static Self::DataStructLong =
crate::provider::Baked::SINGLETON_PROPERTY_NAME_LONG_BIDI_CLASS_V1;
const SINGLETON_SHORT: &'static Self::DataStructShort =
crate::provider::Baked::SINGLETON_PROPERTY_NAME_SHORT_BIDI_CLASS_V1;
fn nep_long_identity<'a>(yoked: &'a PropertyEnumToValueNameLinearMap<'a>)
-> &'a Self::DataStructLongBorrowed<'a> {
yoked
}
fn nep_long_identity_static(stat:
&'static PropertyEnumToValueNameLinearMap<'static>)
-> &'static PropertyEnumToValueNameLinearMap<'static> {
stat
}
fn nep_short_identity<'a>(yoked: &'a PropertyEnumToValueNameLinearMap<'a>)
-> &'a Self::DataStructShortBorrowed<'a> {
yoked
}
fn nep_short_identity_static(stat:
&'static PropertyEnumToValueNameLinearMap<'static>)
-> &'static PropertyEnumToValueNameLinearMap<'static> {
stat
}
}impl_value_getter! {
836 impl BidiClass {
837 PropertyNameParseBidiClassV1 / SINGLETON_PROPERTY_NAME_PARSE_BIDI_CLASS_V1;
838 PropertyEnumToValueNameLinearMap / PropertyNameShortBidiClassV1 / SINGLETON_PROPERTY_NAME_SHORT_BIDI_CLASS_V1;
839 PropertyEnumToValueNameLinearMap / PropertyNameLongBidiClassV1 / SINGLETON_PROPERTY_NAME_LONG_BIDI_CLASS_V1;
840 }
841}
842
843impl ParseableEnumeratedProperty for NumericType {
type DataMarker = PropertyNameParseNumericTypeV1;
const SINGLETON: &'static PropertyValueNameToEnumMap<'static> =
crate::provider::Baked::SINGLETON_PROPERTY_NAME_PARSE_NUMERIC_TYPE_V1;
}
impl NamedEnumeratedProperty for NumericType {
type DataStructLong = PropertyEnumToValueNameLinearMap<'static>;
type DataStructShort = PropertyEnumToValueNameLinearMap<'static>;
type DataStructLongBorrowed<'a> = PropertyEnumToValueNameLinearMap<'a>;
type DataStructShortBorrowed<'a> = PropertyEnumToValueNameLinearMap<'a>;
type DataMarkerLong = crate::provider::PropertyNameLongNumericTypeV1;
type DataMarkerShort = crate::provider::PropertyNameShortNumericTypeV1;
const SINGLETON_LONG: &'static Self::DataStructLong =
crate::provider::Baked::SINGLETON_PROPERTY_NAME_LONG_NUMERIC_TYPE_V1;
const SINGLETON_SHORT: &'static Self::DataStructShort =
crate::provider::Baked::SINGLETON_PROPERTY_NAME_SHORT_NUMERIC_TYPE_V1;
fn nep_long_identity<'a>(yoked: &'a PropertyEnumToValueNameLinearMap<'a>)
-> &'a Self::DataStructLongBorrowed<'a> {
yoked
}
fn nep_long_identity_static(stat:
&'static PropertyEnumToValueNameLinearMap<'static>)
-> &'static PropertyEnumToValueNameLinearMap<'static> {
stat
}
fn nep_short_identity<'a>(yoked: &'a PropertyEnumToValueNameLinearMap<'a>)
-> &'a Self::DataStructShortBorrowed<'a> {
yoked
}
fn nep_short_identity_static(stat:
&'static PropertyEnumToValueNameLinearMap<'static>)
-> &'static PropertyEnumToValueNameLinearMap<'static> {
stat
}
}impl_value_getter! {
844 impl NumericType {
845 PropertyNameParseNumericTypeV1 / SINGLETON_PROPERTY_NAME_PARSE_NUMERIC_TYPE_V1;
846 PropertyEnumToValueNameLinearMap / PropertyNameShortNumericTypeV1 / SINGLETON_PROPERTY_NAME_SHORT_NUMERIC_TYPE_V1;
847 PropertyEnumToValueNameLinearMap / PropertyNameLongNumericTypeV1 / SINGLETON_PROPERTY_NAME_LONG_NUMERIC_TYPE_V1;
848 }
849}
850
851impl ParseableEnumeratedProperty for GeneralCategory {
type DataMarker = PropertyNameParseGeneralCategoryV1;
const SINGLETON: &'static PropertyValueNameToEnumMap<'static> =
crate::provider::Baked::SINGLETON_PROPERTY_NAME_PARSE_GENERAL_CATEGORY_V1;
}
impl NamedEnumeratedProperty for GeneralCategory {
type DataStructLong = PropertyEnumToValueNameLinearMap<'static>;
type DataStructShort = PropertyEnumToValueNameLinearMap<'static>;
type DataStructLongBorrowed<'a> = PropertyEnumToValueNameLinearMap<'a>;
type DataStructShortBorrowed<'a> = PropertyEnumToValueNameLinearMap<'a>;
type DataMarkerLong = crate::provider::PropertyNameLongGeneralCategoryV1;
type DataMarkerShort =
crate::provider::PropertyNameShortGeneralCategoryV1;
const SINGLETON_LONG: &'static Self::DataStructLong =
crate::provider::Baked::SINGLETON_PROPERTY_NAME_LONG_GENERAL_CATEGORY_V1;
const SINGLETON_SHORT: &'static Self::DataStructShort =
crate::provider::Baked::SINGLETON_PROPERTY_NAME_SHORT_GENERAL_CATEGORY_V1;
fn nep_long_identity<'a>(yoked: &'a PropertyEnumToValueNameLinearMap<'a>)
-> &'a Self::DataStructLongBorrowed<'a> {
yoked
}
fn nep_long_identity_static(stat:
&'static PropertyEnumToValueNameLinearMap<'static>)
-> &'static PropertyEnumToValueNameLinearMap<'static> {
stat
}
fn nep_short_identity<'a>(yoked: &'a PropertyEnumToValueNameLinearMap<'a>)
-> &'a Self::DataStructShortBorrowed<'a> {
yoked
}
fn nep_short_identity_static(stat:
&'static PropertyEnumToValueNameLinearMap<'static>)
-> &'static PropertyEnumToValueNameLinearMap<'static> {
stat
}
}impl_value_getter! {
852 impl GeneralCategory {
853 PropertyNameParseGeneralCategoryV1 / SINGLETON_PROPERTY_NAME_PARSE_GENERAL_CATEGORY_V1;
854 PropertyEnumToValueNameLinearMap / PropertyNameShortGeneralCategoryV1 / SINGLETON_PROPERTY_NAME_SHORT_GENERAL_CATEGORY_V1;
855 PropertyEnumToValueNameLinearMap / PropertyNameLongGeneralCategoryV1 / SINGLETON_PROPERTY_NAME_LONG_GENERAL_CATEGORY_V1;
856 }
857}
858
859impl ParseableEnumeratedProperty for GeneralCategoryGroup {
type DataMarker = PropertyNameParseGeneralCategoryMaskV1;
const SINGLETON: &'static PropertyValueNameToEnumMap<'static> =
crate::provider::Baked::SINGLETON_PROPERTY_NAME_PARSE_GENERAL_CATEGORY_MASK_V1;
}impl_value_getter! {
860 impl GeneralCategoryGroup {
861 PropertyNameParseGeneralCategoryMaskV1 / SINGLETON_PROPERTY_NAME_PARSE_GENERAL_CATEGORY_MASK_V1;
862 }
863}
864
865impl ParseableEnumeratedProperty for Script {
type DataMarker = PropertyNameParseScriptV1;
const SINGLETON: &'static PropertyValueNameToEnumMap<'static> =
crate::provider::Baked::SINGLETON_PROPERTY_NAME_PARSE_SCRIPT_V1;
}
impl NamedEnumeratedProperty for Script {
type DataStructLong = PropertyEnumToValueNameLinearMap<'static>;
type DataStructShort = PropertyScriptToIcuScriptMap<'static>;
type DataStructLongBorrowed<'a> = PropertyEnumToValueNameLinearMap<'a>;
type DataStructShortBorrowed<'a> = PropertyScriptToIcuScriptMap<'a>;
type DataMarkerLong = crate::provider::PropertyNameLongScriptV1;
type DataMarkerShort = crate::provider::PropertyNameShortScriptV1;
const SINGLETON_LONG: &'static Self::DataStructLong =
crate::provider::Baked::SINGLETON_PROPERTY_NAME_LONG_SCRIPT_V1;
const SINGLETON_SHORT: &'static Self::DataStructShort =
crate::provider::Baked::SINGLETON_PROPERTY_NAME_SHORT_SCRIPT_V1;
fn nep_long_identity<'a>(yoked: &'a PropertyEnumToValueNameLinearMap<'a>)
-> &'a Self::DataStructLongBorrowed<'a> {
yoked
}
fn nep_long_identity_static(stat:
&'static PropertyEnumToValueNameLinearMap<'static>)
-> &'static PropertyEnumToValueNameLinearMap<'static> {
stat
}
fn nep_short_identity<'a>(yoked: &'a PropertyScriptToIcuScriptMap<'a>)
-> &'a Self::DataStructShortBorrowed<'a> {
yoked
}
fn nep_short_identity_static(stat:
&'static PropertyScriptToIcuScriptMap<'static>)
-> &'static PropertyScriptToIcuScriptMap<'static> {
stat
}
}impl_value_getter! {
866 impl Script {
867 PropertyNameParseScriptV1 / SINGLETON_PROPERTY_NAME_PARSE_SCRIPT_V1;
868 PropertyScriptToIcuScriptMap / PropertyNameShortScriptV1 / SINGLETON_PROPERTY_NAME_SHORT_SCRIPT_V1;
869 PropertyEnumToValueNameLinearMap / PropertyNameLongScriptV1 / SINGLETON_PROPERTY_NAME_LONG_SCRIPT_V1;
870 }
871}
872
873impl ParseableEnumeratedProperty for HangulSyllableType {
type DataMarker = PropertyNameParseHangulSyllableTypeV1;
const SINGLETON: &'static PropertyValueNameToEnumMap<'static> =
crate::provider::Baked::SINGLETON_PROPERTY_NAME_PARSE_HANGUL_SYLLABLE_TYPE_V1;
}
impl NamedEnumeratedProperty for HangulSyllableType {
type DataStructLong = PropertyEnumToValueNameLinearMap<'static>;
type DataStructShort = PropertyEnumToValueNameLinearMap<'static>;
type DataStructLongBorrowed<'a> = PropertyEnumToValueNameLinearMap<'a>;
type DataStructShortBorrowed<'a> = PropertyEnumToValueNameLinearMap<'a>;
type DataMarkerLong =
crate::provider::PropertyNameLongHangulSyllableTypeV1;
type DataMarkerShort =
crate::provider::PropertyNameShortHangulSyllableTypeV1;
const SINGLETON_LONG: &'static Self::DataStructLong =
crate::provider::Baked::SINGLETON_PROPERTY_NAME_LONG_HANGUL_SYLLABLE_TYPE_V1;
const SINGLETON_SHORT: &'static Self::DataStructShort =
crate::provider::Baked::SINGLETON_PROPERTY_NAME_SHORT_HANGUL_SYLLABLE_TYPE_V1;
fn nep_long_identity<'a>(yoked: &'a PropertyEnumToValueNameLinearMap<'a>)
-> &'a Self::DataStructLongBorrowed<'a> {
yoked
}
fn nep_long_identity_static(stat:
&'static PropertyEnumToValueNameLinearMap<'static>)
-> &'static PropertyEnumToValueNameLinearMap<'static> {
stat
}
fn nep_short_identity<'a>(yoked: &'a PropertyEnumToValueNameLinearMap<'a>)
-> &'a Self::DataStructShortBorrowed<'a> {
yoked
}
fn nep_short_identity_static(stat:
&'static PropertyEnumToValueNameLinearMap<'static>)
-> &'static PropertyEnumToValueNameLinearMap<'static> {
stat
}
}impl_value_getter! {
874 impl HangulSyllableType {
875 PropertyNameParseHangulSyllableTypeV1 / SINGLETON_PROPERTY_NAME_PARSE_HANGUL_SYLLABLE_TYPE_V1;
876 PropertyEnumToValueNameLinearMap / PropertyNameShortHangulSyllableTypeV1 / SINGLETON_PROPERTY_NAME_SHORT_HANGUL_SYLLABLE_TYPE_V1;
877 PropertyEnumToValueNameLinearMap / PropertyNameLongHangulSyllableTypeV1 / SINGLETON_PROPERTY_NAME_LONG_HANGUL_SYLLABLE_TYPE_V1;
878 }
879}
880
881impl ParseableEnumeratedProperty for EastAsianWidth {
type DataMarker = PropertyNameParseEastAsianWidthV1;
const SINGLETON: &'static PropertyValueNameToEnumMap<'static> =
crate::provider::Baked::SINGLETON_PROPERTY_NAME_PARSE_EAST_ASIAN_WIDTH_V1;
}
impl NamedEnumeratedProperty for EastAsianWidth {
type DataStructLong = PropertyEnumToValueNameLinearMap<'static>;
type DataStructShort = PropertyEnumToValueNameLinearMap<'static>;
type DataStructLongBorrowed<'a> = PropertyEnumToValueNameLinearMap<'a>;
type DataStructShortBorrowed<'a> = PropertyEnumToValueNameLinearMap<'a>;
type DataMarkerLong = crate::provider::PropertyNameLongEastAsianWidthV1;
type DataMarkerShort = crate::provider::PropertyNameShortEastAsianWidthV1;
const SINGLETON_LONG: &'static Self::DataStructLong =
crate::provider::Baked::SINGLETON_PROPERTY_NAME_LONG_EAST_ASIAN_WIDTH_V1;
const SINGLETON_SHORT: &'static Self::DataStructShort =
crate::provider::Baked::SINGLETON_PROPERTY_NAME_SHORT_EAST_ASIAN_WIDTH_V1;
fn nep_long_identity<'a>(yoked: &'a PropertyEnumToValueNameLinearMap<'a>)
-> &'a Self::DataStructLongBorrowed<'a> {
yoked
}
fn nep_long_identity_static(stat:
&'static PropertyEnumToValueNameLinearMap<'static>)
-> &'static PropertyEnumToValueNameLinearMap<'static> {
stat
}
fn nep_short_identity<'a>(yoked: &'a PropertyEnumToValueNameLinearMap<'a>)
-> &'a Self::DataStructShortBorrowed<'a> {
yoked
}
fn nep_short_identity_static(stat:
&'static PropertyEnumToValueNameLinearMap<'static>)
-> &'static PropertyEnumToValueNameLinearMap<'static> {
stat
}
}impl_value_getter! {
882 impl EastAsianWidth {
883 PropertyNameParseEastAsianWidthV1 / SINGLETON_PROPERTY_NAME_PARSE_EAST_ASIAN_WIDTH_V1;
884 PropertyEnumToValueNameLinearMap / PropertyNameShortEastAsianWidthV1 / SINGLETON_PROPERTY_NAME_SHORT_EAST_ASIAN_WIDTH_V1;
885 PropertyEnumToValueNameLinearMap / PropertyNameLongEastAsianWidthV1 / SINGLETON_PROPERTY_NAME_LONG_EAST_ASIAN_WIDTH_V1;
886 }
887}
888
889impl ParseableEnumeratedProperty for LineBreak {
type DataMarker = PropertyNameParseLineBreakV1;
const SINGLETON: &'static PropertyValueNameToEnumMap<'static> =
crate::provider::Baked::SINGLETON_PROPERTY_NAME_PARSE_LINE_BREAK_V1;
}
impl NamedEnumeratedProperty for LineBreak {
type DataStructLong = PropertyEnumToValueNameLinearMap<'static>;
type DataStructShort = PropertyEnumToValueNameLinearMap<'static>;
type DataStructLongBorrowed<'a> = PropertyEnumToValueNameLinearMap<'a>;
type DataStructShortBorrowed<'a> = PropertyEnumToValueNameLinearMap<'a>;
type DataMarkerLong = crate::provider::PropertyNameLongLineBreakV1;
type DataMarkerShort = crate::provider::PropertyNameShortLineBreakV1;
const SINGLETON_LONG: &'static Self::DataStructLong =
crate::provider::Baked::SINGLETON_PROPERTY_NAME_LONG_LINE_BREAK_V1;
const SINGLETON_SHORT: &'static Self::DataStructShort =
crate::provider::Baked::SINGLETON_PROPERTY_NAME_SHORT_LINE_BREAK_V1;
fn nep_long_identity<'a>(yoked: &'a PropertyEnumToValueNameLinearMap<'a>)
-> &'a Self::DataStructLongBorrowed<'a> {
yoked
}
fn nep_long_identity_static(stat:
&'static PropertyEnumToValueNameLinearMap<'static>)
-> &'static PropertyEnumToValueNameLinearMap<'static> {
stat
}
fn nep_short_identity<'a>(yoked: &'a PropertyEnumToValueNameLinearMap<'a>)
-> &'a Self::DataStructShortBorrowed<'a> {
yoked
}
fn nep_short_identity_static(stat:
&'static PropertyEnumToValueNameLinearMap<'static>)
-> &'static PropertyEnumToValueNameLinearMap<'static> {
stat
}
}impl_value_getter! {
890 impl LineBreak {
891 PropertyNameParseLineBreakV1 / SINGLETON_PROPERTY_NAME_PARSE_LINE_BREAK_V1;
892 PropertyEnumToValueNameLinearMap / PropertyNameShortLineBreakV1 / SINGLETON_PROPERTY_NAME_SHORT_LINE_BREAK_V1;
893 PropertyEnumToValueNameLinearMap / PropertyNameLongLineBreakV1 / SINGLETON_PROPERTY_NAME_LONG_LINE_BREAK_V1;
894 }
895}
896
897impl ParseableEnumeratedProperty for GraphemeClusterBreak {
type DataMarker = PropertyNameParseGraphemeClusterBreakV1;
const SINGLETON: &'static PropertyValueNameToEnumMap<'static> =
crate::provider::Baked::SINGLETON_PROPERTY_NAME_PARSE_GRAPHEME_CLUSTER_BREAK_V1;
}
impl NamedEnumeratedProperty for GraphemeClusterBreak {
type DataStructLong = PropertyEnumToValueNameLinearMap<'static>;
type DataStructShort = PropertyEnumToValueNameLinearMap<'static>;
type DataStructLongBorrowed<'a> = PropertyEnumToValueNameLinearMap<'a>;
type DataStructShortBorrowed<'a> = PropertyEnumToValueNameLinearMap<'a>;
type DataMarkerLong =
crate::provider::PropertyNameLongGraphemeClusterBreakV1;
type DataMarkerShort =
crate::provider::PropertyNameShortGraphemeClusterBreakV1;
const SINGLETON_LONG: &'static Self::DataStructLong =
crate::provider::Baked::SINGLETON_PROPERTY_NAME_LONG_GRAPHEME_CLUSTER_BREAK_V1;
const SINGLETON_SHORT: &'static Self::DataStructShort =
crate::provider::Baked::SINGLETON_PROPERTY_NAME_SHORT_GRAPHEME_CLUSTER_BREAK_V1;
fn nep_long_identity<'a>(yoked: &'a PropertyEnumToValueNameLinearMap<'a>)
-> &'a Self::DataStructLongBorrowed<'a> {
yoked
}
fn nep_long_identity_static(stat:
&'static PropertyEnumToValueNameLinearMap<'static>)
-> &'static PropertyEnumToValueNameLinearMap<'static> {
stat
}
fn nep_short_identity<'a>(yoked: &'a PropertyEnumToValueNameLinearMap<'a>)
-> &'a Self::DataStructShortBorrowed<'a> {
yoked
}
fn nep_short_identity_static(stat:
&'static PropertyEnumToValueNameLinearMap<'static>)
-> &'static PropertyEnumToValueNameLinearMap<'static> {
stat
}
}impl_value_getter! {
898 impl GraphemeClusterBreak {
899 PropertyNameParseGraphemeClusterBreakV1 / SINGLETON_PROPERTY_NAME_PARSE_GRAPHEME_CLUSTER_BREAK_V1;
900 PropertyEnumToValueNameLinearMap / PropertyNameShortGraphemeClusterBreakV1 / SINGLETON_PROPERTY_NAME_SHORT_GRAPHEME_CLUSTER_BREAK_V1;
901 PropertyEnumToValueNameLinearMap / PropertyNameLongGraphemeClusterBreakV1 / SINGLETON_PROPERTY_NAME_LONG_GRAPHEME_CLUSTER_BREAK_V1;
902 }
903}
904
905impl ParseableEnumeratedProperty for WordBreak {
type DataMarker = PropertyNameParseWordBreakV1;
const SINGLETON: &'static PropertyValueNameToEnumMap<'static> =
crate::provider::Baked::SINGLETON_PROPERTY_NAME_PARSE_WORD_BREAK_V1;
}
impl NamedEnumeratedProperty for WordBreak {
type DataStructLong = PropertyEnumToValueNameLinearMap<'static>;
type DataStructShort = PropertyEnumToValueNameLinearMap<'static>;
type DataStructLongBorrowed<'a> = PropertyEnumToValueNameLinearMap<'a>;
type DataStructShortBorrowed<'a> = PropertyEnumToValueNameLinearMap<'a>;
type DataMarkerLong = crate::provider::PropertyNameLongWordBreakV1;
type DataMarkerShort = crate::provider::PropertyNameShortWordBreakV1;
const SINGLETON_LONG: &'static Self::DataStructLong =
crate::provider::Baked::SINGLETON_PROPERTY_NAME_LONG_WORD_BREAK_V1;
const SINGLETON_SHORT: &'static Self::DataStructShort =
crate::provider::Baked::SINGLETON_PROPERTY_NAME_SHORT_WORD_BREAK_V1;
fn nep_long_identity<'a>(yoked: &'a PropertyEnumToValueNameLinearMap<'a>)
-> &'a Self::DataStructLongBorrowed<'a> {
yoked
}
fn nep_long_identity_static(stat:
&'static PropertyEnumToValueNameLinearMap<'static>)
-> &'static PropertyEnumToValueNameLinearMap<'static> {
stat
}
fn nep_short_identity<'a>(yoked: &'a PropertyEnumToValueNameLinearMap<'a>)
-> &'a Self::DataStructShortBorrowed<'a> {
yoked
}
fn nep_short_identity_static(stat:
&'static PropertyEnumToValueNameLinearMap<'static>)
-> &'static PropertyEnumToValueNameLinearMap<'static> {
stat
}
}impl_value_getter! {
906 impl WordBreak {
907 PropertyNameParseWordBreakV1 / SINGLETON_PROPERTY_NAME_PARSE_WORD_BREAK_V1;
908 PropertyEnumToValueNameLinearMap / PropertyNameShortWordBreakV1 / SINGLETON_PROPERTY_NAME_SHORT_WORD_BREAK_V1;
909 PropertyEnumToValueNameLinearMap / PropertyNameLongWordBreakV1 / SINGLETON_PROPERTY_NAME_LONG_WORD_BREAK_V1;
910 }
911}
912
913impl ParseableEnumeratedProperty for SentenceBreak {
type DataMarker = PropertyNameParseSentenceBreakV1;
const SINGLETON: &'static PropertyValueNameToEnumMap<'static> =
crate::provider::Baked::SINGLETON_PROPERTY_NAME_PARSE_SENTENCE_BREAK_V1;
}
impl NamedEnumeratedProperty for SentenceBreak {
type DataStructLong = PropertyEnumToValueNameLinearMap<'static>;
type DataStructShort = PropertyEnumToValueNameLinearMap<'static>;
type DataStructLongBorrowed<'a> = PropertyEnumToValueNameLinearMap<'a>;
type DataStructShortBorrowed<'a> = PropertyEnumToValueNameLinearMap<'a>;
type DataMarkerLong = crate::provider::PropertyNameLongSentenceBreakV1;
type DataMarkerShort = crate::provider::PropertyNameShortSentenceBreakV1;
const SINGLETON_LONG: &'static Self::DataStructLong =
crate::provider::Baked::SINGLETON_PROPERTY_NAME_LONG_SENTENCE_BREAK_V1;
const SINGLETON_SHORT: &'static Self::DataStructShort =
crate::provider::Baked::SINGLETON_PROPERTY_NAME_SHORT_SENTENCE_BREAK_V1;
fn nep_long_identity<'a>(yoked: &'a PropertyEnumToValueNameLinearMap<'a>)
-> &'a Self::DataStructLongBorrowed<'a> {
yoked
}
fn nep_long_identity_static(stat:
&'static PropertyEnumToValueNameLinearMap<'static>)
-> &'static PropertyEnumToValueNameLinearMap<'static> {
stat
}
fn nep_short_identity<'a>(yoked: &'a PropertyEnumToValueNameLinearMap<'a>)
-> &'a Self::DataStructShortBorrowed<'a> {
yoked
}
fn nep_short_identity_static(stat:
&'static PropertyEnumToValueNameLinearMap<'static>)
-> &'static PropertyEnumToValueNameLinearMap<'static> {
stat
}
}impl_value_getter! {
914 impl SentenceBreak {
915 PropertyNameParseSentenceBreakV1 / SINGLETON_PROPERTY_NAME_PARSE_SENTENCE_BREAK_V1;
916 PropertyEnumToValueNameLinearMap / PropertyNameShortSentenceBreakV1 / SINGLETON_PROPERTY_NAME_SHORT_SENTENCE_BREAK_V1;
917 PropertyEnumToValueNameLinearMap / PropertyNameLongSentenceBreakV1 / SINGLETON_PROPERTY_NAME_LONG_SENTENCE_BREAK_V1;
918 }
919}
920
921impl ParseableEnumeratedProperty for CanonicalCombiningClass {
type DataMarker = PropertyNameParseCanonicalCombiningClassV1;
const SINGLETON: &'static PropertyValueNameToEnumMap<'static> =
crate::provider::Baked::SINGLETON_PROPERTY_NAME_PARSE_CANONICAL_COMBINING_CLASS_V1;
}impl_value_getter! {
922 impl CanonicalCombiningClass {
923 PropertyNameParseCanonicalCombiningClassV1 / SINGLETON_PROPERTY_NAME_PARSE_CANONICAL_COMBINING_CLASS_V1;
924 #[cfg(feature = "alloc")]
925 PropertyEnumToValueNameSparseMap / PropertyNameShortCanonicalCombiningClassV1 / SINGLETON_PROPERTY_NAME_SHORT_CANONICAL_COMBINING_CLASS_V1;
927 PropertyEnumToValueNameSparseMap / PropertyNameLongCanonicalCombiningClassV1 / SINGLETON_PROPERTY_NAME_LONG_CANONICAL_COMBINING_CLASS_V1;
928 }
929}
930
931impl ParseableEnumeratedProperty for IndicSyllabicCategory {
type DataMarker = PropertyNameParseIndicSyllabicCategoryV1;
const SINGLETON: &'static PropertyValueNameToEnumMap<'static> =
crate::provider::Baked::SINGLETON_PROPERTY_NAME_PARSE_INDIC_SYLLABIC_CATEGORY_V1;
}
impl NamedEnumeratedProperty for IndicSyllabicCategory {
type DataStructLong = PropertyEnumToValueNameLinearMap<'static>;
type DataStructShort = PropertyEnumToValueNameLinearMap<'static>;
type DataStructLongBorrowed<'a> = PropertyEnumToValueNameLinearMap<'a>;
type DataStructShortBorrowed<'a> = PropertyEnumToValueNameLinearMap<'a>;
type DataMarkerLong =
crate::provider::PropertyNameLongIndicSyllabicCategoryV1;
type DataMarkerShort =
crate::provider::PropertyNameShortIndicSyllabicCategoryV1;
const SINGLETON_LONG: &'static Self::DataStructLong =
crate::provider::Baked::SINGLETON_PROPERTY_NAME_LONG_INDIC_SYLLABIC_CATEGORY_V1;
const SINGLETON_SHORT: &'static Self::DataStructShort =
crate::provider::Baked::SINGLETON_PROPERTY_NAME_SHORT_INDIC_SYLLABIC_CATEGORY_V1;
fn nep_long_identity<'a>(yoked: &'a PropertyEnumToValueNameLinearMap<'a>)
-> &'a Self::DataStructLongBorrowed<'a> {
yoked
}
fn nep_long_identity_static(stat:
&'static PropertyEnumToValueNameLinearMap<'static>)
-> &'static PropertyEnumToValueNameLinearMap<'static> {
stat
}
fn nep_short_identity<'a>(yoked: &'a PropertyEnumToValueNameLinearMap<'a>)
-> &'a Self::DataStructShortBorrowed<'a> {
yoked
}
fn nep_short_identity_static(stat:
&'static PropertyEnumToValueNameLinearMap<'static>)
-> &'static PropertyEnumToValueNameLinearMap<'static> {
stat
}
}impl_value_getter! {
932 impl IndicSyllabicCategory {
933 PropertyNameParseIndicSyllabicCategoryV1 / SINGLETON_PROPERTY_NAME_PARSE_INDIC_SYLLABIC_CATEGORY_V1;
934 PropertyEnumToValueNameLinearMap / PropertyNameShortIndicSyllabicCategoryV1 / SINGLETON_PROPERTY_NAME_SHORT_INDIC_SYLLABIC_CATEGORY_V1;
935 PropertyEnumToValueNameLinearMap / PropertyNameLongIndicSyllabicCategoryV1 / SINGLETON_PROPERTY_NAME_LONG_INDIC_SYLLABIC_CATEGORY_V1;
936 }
937}
938
939impl ParseableEnumeratedProperty for IndicConjunctBreak {
type DataMarker = PropertyNameParseIndicConjunctBreakV1;
const SINGLETON: &'static PropertyValueNameToEnumMap<'static> =
crate::provider::Baked::SINGLETON_PROPERTY_NAME_PARSE_INDIC_CONJUNCT_BREAK_V1;
}
impl NamedEnumeratedProperty for IndicConjunctBreak {
type DataStructLong = PropertyEnumToValueNameLinearMap<'static>;
type DataStructShort = PropertyEnumToValueNameLinearMap<'static>;
type DataStructLongBorrowed<'a> = PropertyEnumToValueNameLinearMap<'a>;
type DataStructShortBorrowed<'a> = PropertyEnumToValueNameLinearMap<'a>;
type DataMarkerLong =
crate::provider::PropertyNameLongIndicConjunctBreakV1;
type DataMarkerShort =
crate::provider::PropertyNameShortIndicConjunctBreakV1;
const SINGLETON_LONG: &'static Self::DataStructLong =
crate::provider::Baked::SINGLETON_PROPERTY_NAME_LONG_INDIC_CONJUNCT_BREAK_V1;
const SINGLETON_SHORT: &'static Self::DataStructShort =
crate::provider::Baked::SINGLETON_PROPERTY_NAME_SHORT_INDIC_CONJUNCT_BREAK_V1;
fn nep_long_identity<'a>(yoked: &'a PropertyEnumToValueNameLinearMap<'a>)
-> &'a Self::DataStructLongBorrowed<'a> {
yoked
}
fn nep_long_identity_static(stat:
&'static PropertyEnumToValueNameLinearMap<'static>)
-> &'static PropertyEnumToValueNameLinearMap<'static> {
stat
}
fn nep_short_identity<'a>(yoked: &'a PropertyEnumToValueNameLinearMap<'a>)
-> &'a Self::DataStructShortBorrowed<'a> {
yoked
}
fn nep_short_identity_static(stat:
&'static PropertyEnumToValueNameLinearMap<'static>)
-> &'static PropertyEnumToValueNameLinearMap<'static> {
stat
}
}impl_value_getter! {
940 impl IndicConjunctBreak {
941 PropertyNameParseIndicConjunctBreakV1 / SINGLETON_PROPERTY_NAME_PARSE_INDIC_CONJUNCT_BREAK_V1;
942 PropertyEnumToValueNameLinearMap / PropertyNameShortIndicConjunctBreakV1 / SINGLETON_PROPERTY_NAME_SHORT_INDIC_CONJUNCT_BREAK_V1;
943 PropertyEnumToValueNameLinearMap / PropertyNameLongIndicConjunctBreakV1 / SINGLETON_PROPERTY_NAME_LONG_INDIC_CONJUNCT_BREAK_V1;
944 }
945}
946
947impl ParseableEnumeratedProperty for JoiningGroup {
type DataMarker = PropertyNameParseJoiningGroupV1;
const SINGLETON: &'static PropertyValueNameToEnumMap<'static> =
crate::provider::Baked::SINGLETON_PROPERTY_NAME_PARSE_JOINING_GROUP_V1;
}
impl NamedEnumeratedProperty for JoiningGroup {
type DataStructLong = PropertyEnumToValueNameLinearMap<'static>;
type DataStructShort = PropertyEnumToValueNameLinearMap<'static>;
type DataStructLongBorrowed<'a> = PropertyEnumToValueNameLinearMap<'a>;
type DataStructShortBorrowed<'a> = PropertyEnumToValueNameLinearMap<'a>;
type DataMarkerLong = crate::provider::PropertyNameLongJoiningGroupV1;
type DataMarkerShort = crate::provider::PropertyNameShortJoiningGroupV1;
const SINGLETON_LONG: &'static Self::DataStructLong =
crate::provider::Baked::SINGLETON_PROPERTY_NAME_LONG_JOINING_GROUP_V1;
const SINGLETON_SHORT: &'static Self::DataStructShort =
crate::provider::Baked::SINGLETON_PROPERTY_NAME_SHORT_JOINING_GROUP_V1;
fn nep_long_identity<'a>(yoked: &'a PropertyEnumToValueNameLinearMap<'a>)
-> &'a Self::DataStructLongBorrowed<'a> {
yoked
}
fn nep_long_identity_static(stat:
&'static PropertyEnumToValueNameLinearMap<'static>)
-> &'static PropertyEnumToValueNameLinearMap<'static> {
stat
}
fn nep_short_identity<'a>(yoked: &'a PropertyEnumToValueNameLinearMap<'a>)
-> &'a Self::DataStructShortBorrowed<'a> {
yoked
}
fn nep_short_identity_static(stat:
&'static PropertyEnumToValueNameLinearMap<'static>)
-> &'static PropertyEnumToValueNameLinearMap<'static> {
stat
}
}impl_value_getter! {
948 impl JoiningGroup {
949 PropertyNameParseJoiningGroupV1 / SINGLETON_PROPERTY_NAME_PARSE_JOINING_GROUP_V1;
950 PropertyEnumToValueNameLinearMap / PropertyNameShortJoiningGroupV1 / SINGLETON_PROPERTY_NAME_SHORT_JOINING_GROUP_V1;
951 PropertyEnumToValueNameLinearMap / PropertyNameLongJoiningGroupV1 / SINGLETON_PROPERTY_NAME_LONG_JOINING_GROUP_V1;
952 }
953}
954
955impl ParseableEnumeratedProperty for JoiningType {
type DataMarker = PropertyNameParseJoiningTypeV1;
const SINGLETON: &'static PropertyValueNameToEnumMap<'static> =
crate::provider::Baked::SINGLETON_PROPERTY_NAME_PARSE_JOINING_TYPE_V1;
}
impl NamedEnumeratedProperty for JoiningType {
type DataStructLong = PropertyEnumToValueNameLinearMap<'static>;
type DataStructShort = PropertyEnumToValueNameLinearMap<'static>;
type DataStructLongBorrowed<'a> = PropertyEnumToValueNameLinearMap<'a>;
type DataStructShortBorrowed<'a> = PropertyEnumToValueNameLinearMap<'a>;
type DataMarkerLong = crate::provider::PropertyNameLongJoiningTypeV1;
type DataMarkerShort = crate::provider::PropertyNameShortJoiningTypeV1;
const SINGLETON_LONG: &'static Self::DataStructLong =
crate::provider::Baked::SINGLETON_PROPERTY_NAME_LONG_JOINING_TYPE_V1;
const SINGLETON_SHORT: &'static Self::DataStructShort =
crate::provider::Baked::SINGLETON_PROPERTY_NAME_SHORT_JOINING_TYPE_V1;
fn nep_long_identity<'a>(yoked: &'a PropertyEnumToValueNameLinearMap<'a>)
-> &'a Self::DataStructLongBorrowed<'a> {
yoked
}
fn nep_long_identity_static(stat:
&'static PropertyEnumToValueNameLinearMap<'static>)
-> &'static PropertyEnumToValueNameLinearMap<'static> {
stat
}
fn nep_short_identity<'a>(yoked: &'a PropertyEnumToValueNameLinearMap<'a>)
-> &'a Self::DataStructShortBorrowed<'a> {
yoked
}
fn nep_short_identity_static(stat:
&'static PropertyEnumToValueNameLinearMap<'static>)
-> &'static PropertyEnumToValueNameLinearMap<'static> {
stat
}
}impl_value_getter! {
956 impl JoiningType {
957 PropertyNameParseJoiningTypeV1 / SINGLETON_PROPERTY_NAME_PARSE_JOINING_TYPE_V1;
958 PropertyEnumToValueNameLinearMap / PropertyNameShortJoiningTypeV1 / SINGLETON_PROPERTY_NAME_SHORT_JOINING_TYPE_V1;
959 PropertyEnumToValueNameLinearMap / PropertyNameLongJoiningTypeV1 / SINGLETON_PROPERTY_NAME_LONG_JOINING_TYPE_V1;
960 }
961}
962
963impl ParseableEnumeratedProperty for VerticalOrientation {
type DataMarker = PropertyNameParseVerticalOrientationV1;
const SINGLETON: &'static PropertyValueNameToEnumMap<'static> =
crate::provider::Baked::SINGLETON_PROPERTY_NAME_PARSE_VERTICAL_ORIENTATION_V1;
}
impl NamedEnumeratedProperty for VerticalOrientation {
type DataStructLong = PropertyEnumToValueNameLinearMap<'static>;
type DataStructShort = PropertyEnumToValueNameLinearMap<'static>;
type DataStructLongBorrowed<'a> = PropertyEnumToValueNameLinearMap<'a>;
type DataStructShortBorrowed<'a> = PropertyEnumToValueNameLinearMap<'a>;
type DataMarkerLong =
crate::provider::PropertyNameLongVerticalOrientationV1;
type DataMarkerShort =
crate::provider::PropertyNameShortVerticalOrientationV1;
const SINGLETON_LONG: &'static Self::DataStructLong =
crate::provider::Baked::SINGLETON_PROPERTY_NAME_LONG_VERTICAL_ORIENTATION_V1;
const SINGLETON_SHORT: &'static Self::DataStructShort =
crate::provider::Baked::SINGLETON_PROPERTY_NAME_SHORT_VERTICAL_ORIENTATION_V1;
fn nep_long_identity<'a>(yoked: &'a PropertyEnumToValueNameLinearMap<'a>)
-> &'a Self::DataStructLongBorrowed<'a> {
yoked
}
fn nep_long_identity_static(stat:
&'static PropertyEnumToValueNameLinearMap<'static>)
-> &'static PropertyEnumToValueNameLinearMap<'static> {
stat
}
fn nep_short_identity<'a>(yoked: &'a PropertyEnumToValueNameLinearMap<'a>)
-> &'a Self::DataStructShortBorrowed<'a> {
yoked
}
fn nep_short_identity_static(stat:
&'static PropertyEnumToValueNameLinearMap<'static>)
-> &'static PropertyEnumToValueNameLinearMap<'static> {
stat
}
}impl_value_getter! {
964 impl VerticalOrientation {
965 PropertyNameParseVerticalOrientationV1 / SINGLETON_PROPERTY_NAME_PARSE_VERTICAL_ORIENTATION_V1;
966 PropertyEnumToValueNameLinearMap / PropertyNameShortVerticalOrientationV1 / SINGLETON_PROPERTY_NAME_SHORT_VERTICAL_ORIENTATION_V1;
967 PropertyEnumToValueNameLinearMap / PropertyNameLongVerticalOrientationV1 / SINGLETON_PROPERTY_NAME_LONG_VERTICAL_ORIENTATION_V1;
968 }
969}