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 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 get_strict_u16(self.map, name)
155 }
156
157 #[inline]
179 pub fn get_strict(self, name: &str) -> Option<T> {
180 T::try_from_u32(self.get_strict_u16(name)? as u32).ok()
181 }
182
183 #[inline]
209 pub fn get_loose_u16(self, name: &str) -> Option<u16> {
210 get_loose_u16(self.map, name)
211 }
212
213 #[inline]
239 pub fn get_loose(self, name: &str) -> Option<T> {
240 T::try_from_u32(self.get_loose_u16(name)? as u32).ok()
241 }
242}
243
244#[cfg(feature = "compiled_data")]
245impl<T: ParseableEnumeratedProperty> Default for PropertyParserBorrowed<'static, T> {
246 fn default() -> Self {
247 Self::new()
248 }
249}
250
251impl<T: TrieValue> PropertyParserBorrowed<'static, T> {
252 #[cfg(feature = "compiled_data")]
258 pub fn new() -> Self
259 where
260 T: ParseableEnumeratedProperty,
261 {
262 Self {
263 map: T::SINGLETON,
264 markers: PhantomData,
265 }
266 }
267
268 pub const fn static_to_owned(self) -> PropertyParser<T> {
273 PropertyParser {
274 map: DataPayload::from_static_ref(self.map),
275 markers: PhantomData,
276 }
277 }
278}
279
280fn get_strict_u16(payload: &PropertyValueNameToEnumMap<'_>, name: &str) -> Option<u16> {
282 payload.map.get(name).and_then(|i| i.try_into().ok())
283}
284
285fn get_loose_u16(payload: &PropertyValueNameToEnumMap<'_>, name: &str) -> Option<u16> {
287 fn recurse(mut cursor: ZeroTrieSimpleAsciiCursor, mut rest: &[u8]) -> Option<usize> {
288 if cursor.is_empty() {
289 return None;
290 }
291
292 for skip in [b'\t', b'\n', b'\x0C', b'\r', b' ', 0x0B, b'_', b'-'] {
294 let mut skip_cursor = cursor.clone();
295 skip_cursor.step(skip);
296 if let Some(r) = recurse(skip_cursor, rest) {
297 return Some(r);
298 }
299 }
300
301 let ascii = loop {
302 let Some((&a, r)) = rest.split_first() else {
303 return cursor.take_value();
304 };
305 rest = r;
306
307 if !#[allow(non_exhaustive_omitted_patterns)] match a {
b'\t' | b'\n' | b'\x0C' | b'\r' | b' ' | 0x0B | b'_' | b'-' => true,
_ => false,
}matches!(
309 a,
310 b'\t' | b'\n' | b'\x0C' | b'\r' | b' ' | 0x0B | b'_' | b'-'
311 ) {
312 break a;
313 }
314 };
315
316 let mut other_case_cursor = cursor.clone();
317 cursor.step(ascii);
318 other_case_cursor.step(if ascii.is_ascii_lowercase() {
319 ascii.to_ascii_uppercase()
320 } else {
321 ascii.to_ascii_lowercase()
322 });
323 recurse(cursor, rest).or_else(|| recurse(other_case_cursor, rest))
327 }
328
329 recurse(payload.map.cursor(), name.as_bytes()).and_then(|i| i.try_into().ok())
330}
331
332pub struct PropertyNamesLong<T: NamedEnumeratedProperty> {
353 map: DataPayload<ErasedMarker<T::DataStructLong>>,
354}
355
356impl<T: NamedEnumeratedProperty> core::fmt::Debug for PropertyNamesLong<T> {
357 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
358 f.debug_struct("PropertyNamesLong")
359 .finish()
361 }
362}
363
364#[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)]
367pub struct PropertyNamesLongBorrowed<'a, T: NamedEnumeratedProperty> {
368 map: &'a T::DataStructLongBorrowed<'a>,
369}
370
371impl<T: NamedEnumeratedProperty> Clone for PropertyNamesLongBorrowed<'_, T> {
372 fn clone(&self) -> Self {
373 *self
374 }
375}
376impl<T: NamedEnumeratedProperty> Copy for PropertyNamesLongBorrowed<'_, T> {}
377
378impl<T: NamedEnumeratedProperty> PropertyNamesLong<T> {
379 #[cfg(feature = "compiled_data")]
385 #[expect(clippy::new_ret_no_self)]
386 pub fn new() -> PropertyNamesLongBorrowed<'static, T> {
387 PropertyNamesLongBorrowed::new()
388 }
389
390 #[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)]
391 pub fn try_new_unstable(
392 provider: &(impl DataProvider<T::DataMarkerLong> + ?Sized),
393 ) -> Result<Self, DataError> {
394 Ok(Self {
395 map: provider.load(Default::default())?.payload.cast(),
396 })
397 }
398
399 #[inline]
404 pub fn as_borrowed(&self) -> PropertyNamesLongBorrowed<'_, T> {
405 PropertyNamesLongBorrowed {
406 map: T::nep_long_identity(self.map.get()),
407 }
408 }
409}
410
411impl<'a, T: NamedEnumeratedProperty> PropertyNamesLongBorrowed<'a, T> {
412 #[inline]
431 pub fn get(self, property: T) -> Option<&'a str> {
432 self.map.get(property.to_u32())
433 }
434}
435
436#[cfg(feature = "compiled_data")]
437impl<T: NamedEnumeratedProperty> Default for PropertyNamesLongBorrowed<'static, T> {
438 fn default() -> Self {
439 Self::new()
440 }
441}
442
443impl<T: NamedEnumeratedProperty> PropertyNamesLongBorrowed<'static, T> {
444 #[cfg(feature = "compiled_data")]
450 pub fn new() -> Self {
451 Self {
452 map: T::SINGLETON_LONG,
453 }
454 }
455
456 pub fn static_to_owned(self) -> PropertyNamesLong<T> {
464 PropertyNamesLong {
465 map: DataPayload::from_static_ref(T::nep_long_identity_static(self.map)),
466 }
467 }
468}
469
470pub struct PropertyNamesShort<T: NamedEnumeratedProperty> {
485 map: DataPayload<ErasedMarker<T::DataStructShort>>,
486}
487
488impl<T: NamedEnumeratedProperty> core::fmt::Debug for PropertyNamesShort<T> {
489 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
490 f.debug_struct("PropertyNamesShort")
491 .finish()
493 }
494}
495
496#[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)]
499pub struct PropertyNamesShortBorrowed<'a, T: NamedEnumeratedProperty> {
500 map: &'a T::DataStructShortBorrowed<'a>,
501}
502
503impl<T: NamedEnumeratedProperty> Clone for PropertyNamesShortBorrowed<'_, T> {
504 fn clone(&self) -> Self {
505 *self
506 }
507}
508
509impl<T: NamedEnumeratedProperty> Copy for PropertyNamesShortBorrowed<'_, T> {}
510
511impl<T: NamedEnumeratedProperty> PropertyNamesShort<T> {
512 #[cfg(feature = "compiled_data")]
518 #[expect(clippy::new_ret_no_self)]
519 pub fn new() -> PropertyNamesShortBorrowed<'static, T> {
520 PropertyNamesShortBorrowed::new()
521 }
522
523 #[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)]
524 pub fn try_new_unstable(
525 provider: &(impl DataProvider<T::DataMarkerShort> + ?Sized),
526 ) -> Result<Self, DataError> {
527 Ok(Self {
528 map: provider.load(Default::default())?.payload.cast(),
529 })
530 }
531
532 #[inline]
537 pub fn as_borrowed(&self) -> PropertyNamesShortBorrowed<'_, T> {
538 PropertyNamesShortBorrowed {
539 map: T::nep_short_identity(self.map.get()),
540 }
541 }
542}
543
544impl<'a, T: NamedEnumeratedProperty> PropertyNamesShortBorrowed<'a, T> {
545 #[inline]
558 pub fn get(self, property: T) -> Option<&'a str> {
559 self.map.get(property.to_u32())
560 }
561}
562
563impl PropertyNamesShortBorrowed<'_, Script> {
564 #[inline]
603 pub fn get_locale_script(self, property: Script) -> Option<icu_locale_core::subtags::Script> {
604 let prop = usize::try_from(property.to_u32()).ok()?;
605 self.map.map.get(prop).and_then(|o| o.0)
606 }
607}
608
609#[cfg(feature = "compiled_data")]
610impl<T: NamedEnumeratedProperty> Default for PropertyNamesShortBorrowed<'static, T> {
611 fn default() -> Self {
612 Self::new()
613 }
614}
615
616impl<T: NamedEnumeratedProperty> PropertyNamesShortBorrowed<'static, T> {
617 #[cfg(feature = "compiled_data")]
623 pub fn new() -> Self {
624 Self {
625 map: T::SINGLETON_SHORT,
626 }
627 }
628
629 pub fn static_to_owned(self) -> PropertyNamesShort<T> {
637 PropertyNamesShort {
638 map: DataPayload::from_static_ref(T::nep_short_identity_static(self.map)),
639 }
640 }
641}
642
643pub trait ParseableEnumeratedProperty: crate::private::Sealed + TrieValue {
645 #[doc(hidden)]
646 type DataMarker: DataMarker<DataStruct = PropertyValueNameToEnumMap<'static>>;
647 #[doc(hidden)]
648 #[cfg(feature = "compiled_data")]
649 const SINGLETON: &'static PropertyValueNameToEnumMap<'static>;
650}
651
652pub trait PropertyEnumToValueNameLookup {
655 fn get(&self, prop: u32) -> Option<&str>;
656}
657
658impl PropertyEnumToValueNameLookup for PropertyEnumToValueNameLinearMap<'_> {
659 fn get(&self, prop: u32) -> Option<&str> {
660 self.map.get(usize::try_from(prop).ok()?)
661 }
662}
663
664#[cfg(feature = "alloc")]
665impl PropertyEnumToValueNameLookup for PropertyEnumToValueNameSparseMap<'_> {
666 fn get(&self, prop: u32) -> Option<&str> {
667 self.map.get(&u16::try_from(prop).ok()?)
668 }
669}
670
671impl PropertyEnumToValueNameLookup for PropertyScriptToIcuScriptMap<'_> {
672 fn get(&self, prop: u32) -> Option<&str> {
673 self.map
674 .get_ule_ref(usize::try_from(prop).ok()?)
675 .and_then(|no| no.as_ref())
676 .map(|s| s.as_str())
677 }
678}
679
680pub trait NamedEnumeratedProperty: ParseableEnumeratedProperty {
682 #[doc(hidden)]
683 type DataStructLong: 'static
684 + for<'a> Yokeable<'a, Output = Self::DataStructLongBorrowed<'a>>
685 + PropertyEnumToValueNameLookup;
686 #[doc(hidden)]
687 type DataStructShort: 'static
688 + for<'a> Yokeable<'a, Output = Self::DataStructShortBorrowed<'a>>
689 + PropertyEnumToValueNameLookup;
690 #[doc(hidden)]
691 type DataStructLongBorrowed<'a>: PropertyEnumToValueNameLookup;
692 #[doc(hidden)]
693 type DataStructShortBorrowed<'a>: PropertyEnumToValueNameLookup;
694 #[doc(hidden)]
695 type DataMarkerLong: DataMarker<DataStruct = Self::DataStructLong>;
696 #[doc(hidden)]
697 type DataMarkerShort: DataMarker<DataStruct = Self::DataStructShort>;
698 #[doc(hidden)]
699 #[cfg(feature = "compiled_data")]
700 const SINGLETON_LONG: &'static Self::DataStructLongBorrowed<'static>;
701 #[doc(hidden)]
702 #[cfg(feature = "compiled_data")]
703 const SINGLETON_SHORT: &'static Self::DataStructShortBorrowed<'static>;
704
705 #[doc(hidden)]
707 fn nep_long_identity<'a>(
708 stat: &'a <Self::DataStructLong as Yokeable<'a>>::Output,
709 ) -> &'a Self::DataStructLongBorrowed<'a>;
710 #[doc(hidden)]
711 fn nep_long_identity_static(
712 stat: &'static Self::DataStructLongBorrowed<'static>,
713 ) -> &'static Self::DataStructLong;
714
715 #[doc(hidden)]
716 fn nep_short_identity<'a>(
717 stat: &'a <Self::DataStructShort as Yokeable<'a>>::Output,
718 ) -> &'a Self::DataStructShortBorrowed<'a>;
719 #[doc(hidden)]
720 fn nep_short_identity_static(
721 stat: &'static Self::DataStructShortBorrowed<'static>,
722 ) -> &'static Self::DataStructShort;
723
724 #[cfg(feature = "compiled_data")]
728 fn try_from_str(s: &str) -> Option<Self> {
729 PropertyParser::new().get_loose(s)
730 }
731 #[cfg(feature = "compiled_data")]
735 fn long_name(&self) -> &'static str {
736 PropertyNamesLong::new().get(*self).unwrap_or("unreachable")
737 }
738 #[cfg(feature = "compiled_data")]
742 fn short_name(&self) -> &'static str {
743 PropertyNamesShort::new()
744 .get(*self)
745 .unwrap_or("unreachable")
746 }
747}
748
749macro_rules! impl_value_getter {
750 (
751 impl $ty:ident {
752 $marker_n2e:ident / $singleton_n2e:ident;
753 $(
754 $(#[$meta:meta])*
755 $data_struct_s:ident / $marker_e2sn:ident / $singleton_e2sn:ident;
756 $data_struct_l:ident / $marker_e2ln:ident / $singleton_e2ln:ident;
757 )?
758 }
759 ) => {
760 impl ParseableEnumeratedProperty for $ty {
761 type DataMarker = $marker_n2e;
762 #[cfg(feature = "compiled_data")]
763 const SINGLETON: &'static PropertyValueNameToEnumMap<'static> = crate::provider::Baked::$singleton_n2e;
764 }
765
766 $(
767 $(#[$meta])*
768 impl NamedEnumeratedProperty for $ty {
769 type DataStructLong = $data_struct_l<'static>;
770 type DataStructShort = $data_struct_s<'static>;
771 type DataStructLongBorrowed<'a> = $data_struct_l<'a>;
772 type DataStructShortBorrowed<'a> = $data_struct_s<'a>;
773 type DataMarkerLong = crate::provider::$marker_e2ln;
774 type DataMarkerShort = crate::provider::$marker_e2sn;
775 #[cfg(feature = "compiled_data")]
776 const SINGLETON_LONG: &'static Self::DataStructLong = crate::provider::Baked::$singleton_e2ln;
777 #[cfg(feature = "compiled_data")]
778 const SINGLETON_SHORT: &'static Self::DataStructShort = crate::provider::Baked::$singleton_e2sn;
779 fn nep_long_identity<'a>(yoked: &'a $data_struct_l<'a>) -> &'a Self::DataStructLongBorrowed<'a> {
780 yoked
781 }
782
783 fn nep_long_identity_static(stat: &'static $data_struct_l<'static>) -> &'static $data_struct_l<'static> {
784 stat
785 }
786
787
788 fn nep_short_identity<'a>(yoked: &'a $data_struct_s<'a>) -> &'a Self::DataStructShortBorrowed<'a> {
789 yoked
790 }
791 fn nep_short_identity_static(stat: &'static $data_struct_s<'static>) -> &'static $data_struct_s<'static> {
792 stat
793 }
794
795 }
796
797
798 )?
799 };
800}
801
802impl 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! {
803 impl BidiClass {
804 PropertyNameParseBidiClassV1 / SINGLETON_PROPERTY_NAME_PARSE_BIDI_CLASS_V1;
805 PropertyEnumToValueNameLinearMap / PropertyNameShortBidiClassV1 / SINGLETON_PROPERTY_NAME_SHORT_BIDI_CLASS_V1;
806 PropertyEnumToValueNameLinearMap / PropertyNameLongBidiClassV1 / SINGLETON_PROPERTY_NAME_LONG_BIDI_CLASS_V1;
807 }
808}
809
810impl 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! {
811 impl GeneralCategory {
812 PropertyNameParseGeneralCategoryV1 / SINGLETON_PROPERTY_NAME_PARSE_GENERAL_CATEGORY_V1;
813 PropertyEnumToValueNameLinearMap / PropertyNameShortGeneralCategoryV1 / SINGLETON_PROPERTY_NAME_SHORT_GENERAL_CATEGORY_V1;
814 PropertyEnumToValueNameLinearMap / PropertyNameLongGeneralCategoryV1 / SINGLETON_PROPERTY_NAME_LONG_GENERAL_CATEGORY_V1;
815 }
816}
817
818impl 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! {
819 impl GeneralCategoryGroup {
820 PropertyNameParseGeneralCategoryMaskV1 / SINGLETON_PROPERTY_NAME_PARSE_GENERAL_CATEGORY_MASK_V1;
821 }
822}
823
824impl 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! {
825 impl Script {
826 PropertyNameParseScriptV1 / SINGLETON_PROPERTY_NAME_PARSE_SCRIPT_V1;
827 PropertyScriptToIcuScriptMap / PropertyNameShortScriptV1 / SINGLETON_PROPERTY_NAME_SHORT_SCRIPT_V1;
828 PropertyEnumToValueNameLinearMap / PropertyNameLongScriptV1 / SINGLETON_PROPERTY_NAME_LONG_SCRIPT_V1;
829 }
830}
831
832impl 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! {
833 impl HangulSyllableType {
834 PropertyNameParseHangulSyllableTypeV1 / SINGLETON_PROPERTY_NAME_PARSE_HANGUL_SYLLABLE_TYPE_V1;
835 PropertyEnumToValueNameLinearMap / PropertyNameShortHangulSyllableTypeV1 / SINGLETON_PROPERTY_NAME_SHORT_HANGUL_SYLLABLE_TYPE_V1;
836 PropertyEnumToValueNameLinearMap / PropertyNameLongHangulSyllableTypeV1 / SINGLETON_PROPERTY_NAME_LONG_HANGUL_SYLLABLE_TYPE_V1;
837 }
838}
839
840impl 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! {
841 impl EastAsianWidth {
842 PropertyNameParseEastAsianWidthV1 / SINGLETON_PROPERTY_NAME_PARSE_EAST_ASIAN_WIDTH_V1;
843 PropertyEnumToValueNameLinearMap / PropertyNameShortEastAsianWidthV1 / SINGLETON_PROPERTY_NAME_SHORT_EAST_ASIAN_WIDTH_V1;
844 PropertyEnumToValueNameLinearMap / PropertyNameLongEastAsianWidthV1 / SINGLETON_PROPERTY_NAME_LONG_EAST_ASIAN_WIDTH_V1;
845 }
846}
847
848impl 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! {
849 impl LineBreak {
850 PropertyNameParseLineBreakV1 / SINGLETON_PROPERTY_NAME_PARSE_LINE_BREAK_V1;
851 PropertyEnumToValueNameLinearMap / PropertyNameShortLineBreakV1 / SINGLETON_PROPERTY_NAME_SHORT_LINE_BREAK_V1;
852 PropertyEnumToValueNameLinearMap / PropertyNameLongLineBreakV1 / SINGLETON_PROPERTY_NAME_LONG_LINE_BREAK_V1;
853 }
854}
855
856impl 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! {
857 impl GraphemeClusterBreak {
858 PropertyNameParseGraphemeClusterBreakV1 / SINGLETON_PROPERTY_NAME_PARSE_GRAPHEME_CLUSTER_BREAK_V1;
859 PropertyEnumToValueNameLinearMap / PropertyNameShortGraphemeClusterBreakV1 / SINGLETON_PROPERTY_NAME_SHORT_GRAPHEME_CLUSTER_BREAK_V1;
860 PropertyEnumToValueNameLinearMap / PropertyNameLongGraphemeClusterBreakV1 / SINGLETON_PROPERTY_NAME_LONG_GRAPHEME_CLUSTER_BREAK_V1;
861 }
862}
863
864impl 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! {
865 impl WordBreak {
866 PropertyNameParseWordBreakV1 / SINGLETON_PROPERTY_NAME_PARSE_WORD_BREAK_V1;
867 PropertyEnumToValueNameLinearMap / PropertyNameShortWordBreakV1 / SINGLETON_PROPERTY_NAME_SHORT_WORD_BREAK_V1;
868 PropertyEnumToValueNameLinearMap / PropertyNameLongWordBreakV1 / SINGLETON_PROPERTY_NAME_LONG_WORD_BREAK_V1;
869 }
870}
871
872impl 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! {
873 impl SentenceBreak {
874 PropertyNameParseSentenceBreakV1 / SINGLETON_PROPERTY_NAME_PARSE_SENTENCE_BREAK_V1;
875 PropertyEnumToValueNameLinearMap / PropertyNameShortSentenceBreakV1 / SINGLETON_PROPERTY_NAME_SHORT_SENTENCE_BREAK_V1;
876 PropertyEnumToValueNameLinearMap / PropertyNameLongSentenceBreakV1 / SINGLETON_PROPERTY_NAME_LONG_SENTENCE_BREAK_V1;
877 }
878}
879
880impl 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! {
881 impl CanonicalCombiningClass {
882 PropertyNameParseCanonicalCombiningClassV1 / SINGLETON_PROPERTY_NAME_PARSE_CANONICAL_COMBINING_CLASS_V1;
883 #[cfg(feature = "alloc")]
884 PropertyEnumToValueNameSparseMap / PropertyNameShortCanonicalCombiningClassV1 / SINGLETON_PROPERTY_NAME_SHORT_CANONICAL_COMBINING_CLASS_V1;
886 PropertyEnumToValueNameSparseMap / PropertyNameLongCanonicalCombiningClassV1 / SINGLETON_PROPERTY_NAME_LONG_CANONICAL_COMBINING_CLASS_V1;
887 }
888}
889
890impl 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! {
891 impl IndicSyllabicCategory {
892 PropertyNameParseIndicSyllabicCategoryV1 / SINGLETON_PROPERTY_NAME_PARSE_INDIC_SYLLABIC_CATEGORY_V1;
893 PropertyEnumToValueNameLinearMap / PropertyNameShortIndicSyllabicCategoryV1 / SINGLETON_PROPERTY_NAME_SHORT_INDIC_SYLLABIC_CATEGORY_V1;
894 PropertyEnumToValueNameLinearMap / PropertyNameLongIndicSyllabicCategoryV1 / SINGLETON_PROPERTY_NAME_LONG_INDIC_SYLLABIC_CATEGORY_V1;
895 }
896}
897
898impl 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! {
899 impl JoiningType {
900 PropertyNameParseJoiningTypeV1 / SINGLETON_PROPERTY_NAME_PARSE_JOINING_TYPE_V1;
901 PropertyEnumToValueNameLinearMap / PropertyNameShortJoiningTypeV1 / SINGLETON_PROPERTY_NAME_SHORT_JOINING_TYPE_V1;
902 PropertyEnumToValueNameLinearMap / PropertyNameLongJoiningTypeV1 / SINGLETON_PROPERTY_NAME_LONG_JOINING_TYPE_V1;
903 }
904}
905
906impl 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! {
907 impl VerticalOrientation {
908 PropertyNameParseVerticalOrientationV1 / SINGLETON_PROPERTY_NAME_PARSE_VERTICAL_ORIENTATION_V1;
909 PropertyEnumToValueNameLinearMap / PropertyNameShortVerticalOrientationV1 / SINGLETON_PROPERTY_NAME_SHORT_VERTICAL_ORIENTATION_V1;
910 PropertyEnumToValueNameLinearMap / PropertyNameLongVerticalOrientationV1 / SINGLETON_PROPERTY_NAME_LONG_VERTICAL_ORIENTATION_V1;
911 }
912}