// @generated /// Implement `DataProvider` on the given struct using the data /// hardcoded in this file. This allows the struct to be used with /// `icu`'s `_unstable` constructors. /// /// Using this implementation will embed the following data in the binary's data segment: /// * 537B for the lookup data structure (110 data identifiers) /// * 36B[^1] for the actual data (9 unique structs) /// /// [^1]: these numbers can be smaller in practice due to linker deduplication #[doc(hidden)] #[macro_export] macro_rules! __impl_collation_metadata_v1_marker { ($ provider : ty) => { #[clippy::msrv = "1.71.1"] const _: () = <$provider>::MUST_USE_MAKE_PROVIDER_MACRO; #[clippy::msrv = "1.71.1"] impl $provider { const DATA_COLLATION_METADATA_V1_MARKER: icu_provider_baked::zerotrie::Data = icu_provider_baked::zerotrie::Data { trie: icu_provider_baked::zerotrie::ZeroTrieSimpleAscii { store: b"\xE1wabcdefghijklmnoprstuvwy\0\0\0\0\0\0\0\0\0\0\0\0\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x172@Rs\x97\x9D\xB3\xB9\xC3\xEA\xF3\x05\x0F\x15\x1E$H]\xA8\xB0\xB2\xC5fmrsz\x01\x02\x0B\x0C\x80\x81\x82\x1Ecompat\x82\x82\x82\xC5egnrs\x01\x02\t\n\x82\x81\x82\x1Etrad\x82\x80\x82-Cyrl\x82\xC4ehsy\x02\x04\x05b\x80r\x81\x80\x80\xC3aes\x01\n\x83\x1Ephonebk\x80b\x80\xC6elnost\x01\x02\x0C\r\x14\x84\x81-US-posix\x80\x80\x80\x1Etrad\x80\x80\xC6afiory\x01\x07\x12\x13\x17\x82-Adlm\x80\x80\xC2\x1El\x05trad\x80\x80\x80-CA\x85\x80\xC2lu\x01\x80\x82\xC7aeirsuy\x01\x02\x03\x04\x06\x07\x80\x81\x82\x82b\x80\x80\x82\xC2gs\x01\x80\x80a\x82\x1Eunihan\x82\xC7akmnouy\x01\x02\x03\n\x17\x18\x81\x82\x82\x82\x1Etrad\x82\x82\xC2\x1Ek\x07unihan\x82\x82\x82\x82\xC3otv\x01\x02\x81\x86\x80\xC6klnrty\x01\x02\x03\x04\x05\x82\x82\x81\x82\x83\x82\xC3eos\x01\x02\x81\x80o\x80\xC2mr\x01\x80\x82\xC3als\x01\x02\x82\x80\x82\xC2ou\x01\x80\x81\xC6iklqrv\x07\x08\t\n\x11\x82\x1Edict\x82\x80\x80\x80\x82-Latn\x82\x80\x1Etrad\x80\xC7aehknor\x01\x02\x03\x04\x05\x06\x82\x82\x87\x80\x80\x80\x80\xC5gknrz\x01\x02?@\x82\x82d\x88\xC2\x1E-\x0Be\xC2mo\x04oji\x88r\x88Han\xC3ist!\"\x1E\xC4psuz\x06\x0C\x12inyin\x82troke\x82nihan\x82huyin\x82\x82\x82\x82\x80i\x84\x1Etrad\x84o\x80o\x80" }, values: &[icu::collator::provider::CollationMetadataV1 { bits: 9u32 }, icu::collator::provider::CollationMetadataV1 { bits: 33u32 }, icu::collator::provider::CollationMetadataV1 { bits: 41u32 }, icu::collator::provider::CollationMetadataV1 { bits: 1545u32 }, icu::collator::provider::CollationMetadataV1 { bits: 25u32 }, icu::collator::provider::CollationMetadataV1 { bits: 129u32 }, icu::collator::provider::CollationMetadataV1 { bits: 73u32 }, icu::collator::provider::CollationMetadataV1 { bits: 297u32 }, icu::collator::provider::CollationMetadataV1 { bits: 1u32 }] }; } #[clippy::msrv = "1.71.1"] impl icu_provider::DataProvider for $provider { fn load(&self, req: icu_provider::DataRequest) -> Result, icu_provider::DataError> { let mut metadata = icu_provider::DataResponseMetadata::default(); let payload = if let Some(payload) = icu_provider_baked::DataStore::get(&Self::DATA_COLLATION_METADATA_V1_MARKER, req.id, req.metadata.attributes_prefix_match) { payload } else { const FALLBACKER: icu::locale::fallback::LocaleFallbackerWithConfig<'static> = icu::locale::fallback::LocaleFallbacker::new().for_config(::INFO.fallback_config); let mut fallback_iterator = FALLBACKER.fallback_for(req.id.locale.clone()); loop { if let Some(payload) = icu_provider_baked::DataStore::get(&Self::DATA_COLLATION_METADATA_V1_MARKER, icu_provider::DataIdentifierBorrowed::for_marker_attributes_and_locale(req.id.marker_attributes, fallback_iterator.get()), req.metadata.attributes_prefix_match) { metadata.locale = Some(fallback_iterator.take()); break payload; } if fallback_iterator.get().is_default() { return Err(icu_provider::DataErrorKind::IdentifierNotFound.with_req(::INFO, req)); } fallback_iterator.step(); } }; Ok(icu_provider::DataResponse { payload: icu_provider::DataPayload::from_static_ref(payload), metadata }) } } }; ($ provider : ty , ITER) => { __impl_collation_metadata_v1_marker!($provider); #[clippy::msrv = "1.71.1"] impl icu_provider::IterableDataProvider for $provider { fn iter_ids(&self) -> Result>, icu_provider::DataError> { Ok(icu_provider_baked::DataStore::iter(&Self::DATA_COLLATION_METADATA_V1_MARKER).collect()) } } }; ($ provider : ty , DRY) => {}; ($ provider : ty , DRY , ITER) => { __impl_collation_metadata_v1_marker!($provider, ITER); }; } #[doc(inline)] pub use __impl_collation_metadata_v1_marker as impl_collation_metadata_v1_marker;