1// @generated 2/// Implement `DataProvider<GraphemeClusterBreakNameToValueV2>` on the given struct using the data 3/// hardcoded in this file. This allows the struct to be used with 4/// `icu`'s `_unstable` constructors. 5/// 6/// Using this implementation will embed the following data in the binary's data segment: 7/// * 194B[^1] for the singleton data struct 8/// 9/// [^1]: these numbers can be smaller in practice due to linker deduplication 10#[doc(hidden)] 11#[macro_export] 12macro_rules! __impl_grapheme_cluster_break_name_to_value_v2 { 13 ($ provider : ty) => { 14 #[clippy::msrv = "1.81"] 15 const _: () = <$provider>::MUST_USE_MAKE_PROVIDER_MACRO; 16 #[clippy::msrv = "1.81"] 17 impl $provider { 18 #[doc(hidden)] 19 pub const SINGLETON_GRAPHEME_CLUSTER_BREAK_NAME_TO_VALUE_V2: &'static <icu::properties::provider::GraphemeClusterBreakNameToValueV2 as icu_provider::DynamicDataMarker>::DataStruct = &icu::properties::provider::names::PropertyValueNameToEnumMap { map: zerotrie::ZeroTrieSimpleAscii { store: unsafe { zerovec::ZeroVec::from_bytes_unchecked(b"\xCCCEGLOPRSTVXZ\x0E7LUZe{\x8A\x8B\x8C\x8E\xC3NRo\x01\x02\x81\x82ntrol\x81\xC5BMX_x\x03\x04\x05\x1A\x8DG\x8E\x8F\x83\xC2BM\tase\x8D_GAZ\x8Eodifier\x8Ftend\x83\xC2Al\x03Z\x90\0ue_After_Zwj\x90\0\x84\xC2FV\x01\x85\x86T\x87ther\x80\xC2Pr\x01\x8Bepend\x8B\xC2Ie\x01\x8Cgional_Indicator\x8C\xC2Mp\x01\x8AacingMark\x8A\x88\x89X\x80WJ\x90\x01") } } }; 20 } 21 #[clippy::msrv = "1.81"] 22 impl icu_provider::DataProvider<icu::properties::provider::GraphemeClusterBreakNameToValueV2> for $provider { 23 fn load(&self, req: icu_provider::DataRequest) -> Result<icu_provider::DataResponse<icu::properties::provider::GraphemeClusterBreakNameToValueV2>, icu_provider::DataError> { 24 if req.id.locale.is_default() { 25 Ok(icu_provider::DataResponse { payload: icu_provider::DataPayload::from_static_ref(Self::SINGLETON_GRAPHEME_CLUSTER_BREAK_NAME_TO_VALUE_V2), metadata: icu_provider::DataResponseMetadata::default() }) 26 } else { 27 Err(icu_provider::DataErrorKind::InvalidRequest.with_req(<icu::properties::provider::GraphemeClusterBreakNameToValueV2 as icu_provider::DataMarker>::INFO, req)) 28 } 29 } 30 } 31 }; 32 ($ provider : ty , ITER) => { 33 __impl_grapheme_cluster_break_name_to_value_v2!($provider); 34 #[clippy::msrv = "1.81"] 35 impl icu_provider::IterableDataProvider<icu::properties::provider::GraphemeClusterBreakNameToValueV2> for $provider { 36 fn iter_ids(&self) -> Result<std::collections::BtreeSet<icu_provider::DataIdentifierCow<'static>>, icu_provider::DataError> { 37 Ok([Default::default()].into_iter().collect()) 38 } 39 } 40 }; 41 ($ provider : ty , DRY) => { 42 __impl_grapheme_cluster_break_name_to_value_v2!($provider); 43 #[clippy::msrv = "1.81"] 44 impl icu_provider::DryDataProvider<icu::properties::provider::GraphemeClusterBreakNameToValueV2> for $provider { 45 fn dry_load(&self, req: icu_provider::DataRequest) -> Result<icu_provider::DataResponseMetadata, icu_provider::DataError> { 46 if req.id.locale.is_default() { 47 Ok(icu_provider::DataResponseMetadata::default()) 48 } else { 49 Err(icu_provider::DataErrorKind::InvalidRequest.with_req(<icu::properties::provider::GraphemeClusterBreakNameToValueV2 as icu_provider::DataMarker>::INFO, req)) 50 } 51 } 52 } 53 }; 54 ($ provider : ty , DRY , ITER) => { 55 __impl_grapheme_cluster_break_name_to_value_v2!($provider); 56 #[clippy::msrv = "1.81"] 57 impl icu_provider::DryDataProvider<icu::properties::provider::GraphemeClusterBreakNameToValueV2> for $provider { 58 fn dry_load(&self, req: icu_provider::DataRequest) -> Result<icu_provider::DataResponseMetadata, icu_provider::DataError> { 59 if req.id.locale.is_default() { 60 Ok(icu_provider::DataResponseMetadata::default()) 61 } else { 62 Err(icu_provider::DataErrorKind::InvalidRequest.with_req(<icu::properties::provider::GraphemeClusterBreakNameToValueV2 as icu_provider::DataMarker>::INFO, req)) 63 } 64 } 65 } 66 #[clippy::msrv = "1.81"] 67 impl icu_provider::IterableDataProvider<icu::properties::provider::GraphemeClusterBreakNameToValueV2> for $provider { 68 fn iter_ids(&self) -> Result<std::collections::BtreeSet<icu_provider::DataIdentifierCow<'static>>, icu_provider::DataError> { 69 Ok([Default::default()].into_iter().collect()) 70 } 71 } 72 }; 73} 74#[doc(inline)] 75pub use __impl_grapheme_cluster_break_name_to_value_v2 as impl_grapheme_cluster_break_name_to_value_v2; 76