| 1 |
// @generated |
| 2 |
/// Implement `DataProvider<EastAsianWidthNameToValueV1Marker>` 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 |
#[doc(hidden)] |
| 6 |
#[macro_export] |
| 7 |
macro_rules! __impl_propnames_from_ea_v1 { |
| 8 |
($ provider : ty) => { |
| 9 |
#[clippy::msrv = "1.67"] |
| 10 |
const _: () = <$provider>::MUST_USE_MAKE_PROVIDER_MACRO; |
| 11 |
#[clippy::msrv = "1.67"] |
| 12 |
impl $provider { |
| 13 |
#[doc(hidden)] |
| 14 |
pub const SINGLETON_PROPNAMES_FROM_EA_V1: &'static <icu::properties::provider::EastAsianWidthNameToValueV1Marker as icu_provider::DataMarker>::Yokeable = &icu::properties::provider::names::PropertyValueNameToEnumMapV1 { |
| 15 |
map: unsafe { |
| 16 |
#[allow(unused_unsafe)] |
| 17 |
zerovec::ZeroMap::from_parts_unchecked(unsafe { zerovec::VarZeroVec::from_bytes_unchecked(b"\x0C\0\0\0\0\0\x01\0\n\0\x0B\0\x14\0\x15\0\x1E\0\x1F\0!\0'\0.\0/\0AAmbiguousFFullwidthHHalfwidthNNaNarrowNeutralWWide") }, unsafe { zerovec::ZeroVec::from_bytes_unchecked(b"\x01\0\x01\0\x03\0\x03\0\x02\0\x02\0\0\0\x04\0\x04\0\0\0\x05\0\x05\0") }) |
| 18 |
}, |
| 19 |
}; |
| 20 |
} |
| 21 |
#[clippy::msrv = "1.67"] |
| 22 |
impl icu_provider::DataProvider<icu::properties::provider::EastAsianWidthNameToValueV1Marker> for $provider { |
| 23 |
fn load(&self, req: icu_provider::DataRequest) -> Result<icu_provider::DataResponse<icu::properties::provider::EastAsianWidthNameToValueV1Marker>, icu_provider::DataError> { |
| 24 |
if req.locale.is_empty() { |
| 25 |
Ok(icu_provider::DataResponse { payload: Some(icu_provider::DataPayload::from_static_ref(Self::SINGLETON_PROPNAMES_FROM_EA_V1)), metadata: Default::default() }) |
| 26 |
} else { |
| 27 |
Err(icu_provider::DataErrorKind::ExtraneousLocale.with_req(<icu::properties::provider::EastAsianWidthNameToValueV1Marker as icu_provider::KeyedDataMarker>::KEY, req)) |
| 28 |
} |
| 29 |
} |
| 30 |
} |
| 31 |
}; |
| 32 |
} |
| 33 |
/// Implement `IterableDataProvider<EastAsianWidthNameToValueV1Marker>` on the given struct using the data |
| 34 |
/// hardcoded in this file. This allows the struct to be used with |
| 35 |
/// `DatagenDriver` for this key. |
| 36 |
#[doc(hidden)] |
| 37 |
#[macro_export] |
| 38 |
macro_rules! __impliterable_propnames_from_ea_v1 { |
| 39 |
($ provider : ty) => { |
| 40 |
#[clippy::msrv = "1.67"] |
| 41 |
impl icu_provider::datagen::IterableDataProvider<icu::properties::provider::EastAsianWidthNameToValueV1Marker> for $provider { |
| 42 |
fn supported_locales(&self) -> Result<alloc::vec::Vec<icu_provider::DataLocale>, icu_provider::DataError> { |
| 43 |
Ok([icu_provider::DataLocale::default()].into()) |
| 44 |
} |
| 45 |
} |
| 46 |
}; |
| 47 |
} |