// @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: /// * 134B[^1] for the singleton data struct /// /// [^1]: these numbers can be smaller in practice due to linker deduplication #[doc(hidden)] #[macro_export] macro_rules! __impl_japanese_eras_v1_marker { ($ provider : ty) => { #[clippy::msrv = "1.71.1"] const _: () = <$provider>::MUST_USE_MAKE_PROVIDER_MACRO; #[clippy::msrv = "1.71.1"] impl $provider { #[doc(hidden)] pub const SINGLETON_JAPANESE_ERAS_V1_MARKER: &'static ::DataStruct = &icu::calendar::provider::JapaneseErasV1 { dates_to_eras: unsafe { zerovec::ZeroVec::from_bytes_unchecked(b"L\x07\0\0\t\x08meiji\0\0\0\0\0\0\0\0\0\0\0x\x07\0\0\x07\x1Etaisho\0\0\0\0\0\0\0\0\0\0\x86\x07\0\0\x0C\x19showa\0\0\0\0\0\0\0\0\0\0\0\xC5\x07\0\0\x01\x08heisei\0\0\0\0\0\0\0\0\0\0\xE3\x07\0\0\x05\x01reiwa\0\0\0\0\0\0\0\0\0\0\0") } }; } #[clippy::msrv = "1.71.1"] impl icu_provider::DataProvider for $provider { fn load(&self, req: icu_provider::DataRequest) -> Result, icu_provider::DataError> { if req.id.locale.is_default() { Ok(icu_provider::DataResponse { payload: icu_provider::DataPayload::from_static_ref(Self::SINGLETON_JAPANESE_ERAS_V1_MARKER), metadata: Default::default() }) } else { Err(icu_provider::DataErrorKind::InvalidRequest.with_req(::INFO, req)) } } } }; ($ provider : ty , ITER) => { __impl_japanese_eras_v1_marker!($provider); #[clippy::msrv = "1.71.1"] impl icu_provider::IterableDataProvider for $provider { fn iter_ids(&self) -> Result>, icu_provider::DataError> { Ok([Default::default()].into_iter().collect()) } } }; ($ provider : ty , DRY) => { __impl_japanese_eras_v1_marker!($provider); #[clippy::msrv = "1.71.1"] impl icu_provider::DryDataProvider for $provider { fn dry_load(&self, req: icu_provider::DataRequest) -> Result { if req.id.locale.is_default() { Ok(Default::default()) } else { Err(icu_provider::DataErrorKind::InvalidRequest.with_req(::INFO, req)) } } } }; ($ provider : ty , DRY , ITER) => { __impl_japanese_eras_v1_marker!($provider); #[clippy::msrv = "1.71.1"] impl icu_provider::DryDataProvider for $provider { fn dry_load(&self, req: icu_provider::DataRequest) -> Result { if req.id.locale.is_default() { Ok(Default::default()) } else { Err(icu_provider::DataErrorKind::InvalidRequest.with_req(::INFO, req)) } } } #[clippy::msrv = "1.71.1"] impl icu_provider::IterableDataProvider for $provider { fn iter_ids(&self) -> Result>, icu_provider::DataError> { Ok([Default::default()].into_iter().collect()) } } }; } #[doc(inline)] pub use __impl_japanese_eras_v1_marker as impl_japanese_eras_v1_marker;