Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AnyProvider for BakedDataProvider #2098

Merged
merged 7 commits into from
Jul 1, 2022
Merged

Conversation

robertbastian
Copy link
Member

@robertbastian robertbastian commented Jun 23, 2022

Fixes #2088

@robertbastian robertbastian linked an issue Jun 23, 2022 that may be closed by this pull request
@robertbastian robertbastian marked this pull request as ready for review June 23, 2022 16:27
@robertbastian robertbastian requested review from a team, sffc and Manishearth as code owners June 23, 2022 16:27
}
}
type DataStruct = &'static <::icu_calendar::provider::JapaneseErasV1Marker as DataMarker>::Yokeable;
type DataStruct = & 'static < :: icu_calendar :: provider :: JapaneseErasV1Marker as :: icu_provider :: DataMarker > :: Yokeable ;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: this doesn't look that good

@@ -15,3 +11,4 @@ mod plurals;
mod props;
mod segmenter;
mod time_zone;
macro_rules ! declare_baked_provider { ($ name : ident , impl AnyProvider) => { declare_baked_provider ! ($ name) ; impl :: icu_provider :: AnyProvider for $ name { fn load_any (& self , key : :: icu_provider :: ResourceKey , req : & :: icu_provider :: DataRequest) -> Result < :: icu_provider :: AnyResponse , :: icu_provider :: DataError > { Ok (:: icu_provider :: AnyResponse { payload : Some (match key { < :: icu_calendar :: provider :: JapaneseErasV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_calendar :: provider :: JapaneseErasV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (calendar :: japanese_v1 :: DATA , key , req) ?) , < :: icu_casemapping :: provider :: CaseMappingV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_casemapping :: provider :: CaseMappingV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (props :: casemap_v1 :: DATA , key , req) ?) , < :: icu_collator :: provider :: CollationDataV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_collator :: provider :: CollationDataV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (collator :: data_v1 :: DATA , key , req) ?) , < :: icu_collator :: provider :: CollationDiacriticsV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_collator :: provider :: CollationDiacriticsV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (collator :: dia_v1 :: DATA , key , req) ?) , < :: icu_collator :: provider :: CollationJamoV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_collator :: provider :: CollationJamoV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (collator :: jamo_v1 :: DATA , key , req) ?) , < :: icu_collator :: provider :: CollationMetadataV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_collator :: provider :: CollationMetadataV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (collator :: meta_v1 :: DATA , key , req) ?) , < :: icu_collator :: provider :: CollationReorderingV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_collator :: provider :: CollationReorderingV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (collator :: reord_v1 :: DATA , key , req) ?) , < :: icu_collator :: provider :: CollationSpecialPrimariesV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_collator :: provider :: CollationSpecialPrimariesV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (collator :: prim_v1 :: DATA , key , req) ?) , < :: icu_datetime :: provider :: calendar :: DatePatternsV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_datetime :: provider :: calendar :: DatePatternsV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (datetime :: lengths_v1 :: DATA , key , req) ?) , < :: icu_datetime :: provider :: calendar :: DateSkeletonPatternsV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_rc_payload :: < :: icu_datetime :: provider :: calendar :: DateSkeletonPatternsV1Marker > (alloc :: rc :: Rc :: new (:: icu_provider :: DataPayload :: from_owned (:: icu_provider :: zerofrom :: ZeroFrom :: zero_from (litemap_slice_get (datetime :: skeletons_v1 :: DATA , key , req) ?)))) , < :: icu_datetime :: provider :: calendar :: DateSymbolsV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_datetime :: provider :: calendar :: DateSymbolsV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (datetime :: symbols_v1 :: DATA , key , req) ?) , < :: icu_datetime :: provider :: time_zones :: ExemplarCitiesV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_datetime :: provider :: time_zones :: ExemplarCitiesV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (time_zone :: exemplar_cities_v1 :: DATA , key , req) ?) , < :: icu_datetime :: provider :: time_zones :: MetaZoneGenericNamesLongV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_datetime :: provider :: time_zones :: MetaZoneGenericNamesLongV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (time_zone :: generic_long_v1 :: DATA , key , req) ?) , < :: icu_datetime :: provider :: time_zones :: MetaZoneGenericNamesShortV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_datetime :: provider :: time_zones :: MetaZoneGenericNamesShortV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (time_zone :: generic_short_v1 :: DATA , key , req) ?) , < :: icu_datetime :: provider :: time_zones :: MetaZonePeriodV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_datetime :: provider :: time_zones :: MetaZonePeriodV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (time_zone :: metazone_period_v1 :: DATA , key , req) ?) , < :: icu_datetime :: provider :: time_zones :: MetaZoneSpecificNamesLongV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_datetime :: provider :: time_zones :: MetaZoneSpecificNamesLongV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (time_zone :: specific_long_v1 :: DATA , key , req) ?) , < :: icu_datetime :: provider :: time_zones :: MetaZoneSpecificNamesShortV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_datetime :: provider :: time_zones :: MetaZoneSpecificNamesShortV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (time_zone :: specific_short_v1 :: DATA , key , req) ?) , < :: icu_datetime :: provider :: time_zones :: TimeZoneFormatsV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_datetime :: provider :: time_zones :: TimeZoneFormatsV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (time_zone :: formats_v1 :: DATA , key , req) ?) , < :: icu_datetime :: provider :: week_data :: WeekDataV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_datetime :: provider :: week_data :: WeekDataV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (datetime :: week_data_v1 :: DATA , key , req) ?) , < :: icu_decimal :: provider :: DecimalSymbolsV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_decimal :: provider :: DecimalSymbolsV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (decimal :: symbols_v1 :: DATA , key , req) ?) , < :: icu_list :: provider :: AndListV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_list :: provider :: AndListV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (list :: and_v1 :: DATA , key , req) ?) , < :: icu_list :: provider :: OrListV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_list :: provider :: OrListV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (list :: or_v1 :: DATA , key , req) ?) , < :: icu_list :: provider :: UnitListV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_list :: provider :: UnitListV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (list :: unit_v1 :: DATA , key , req) ?) , < :: icu_locale_canonicalizer :: provider :: AliasesV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_locale_canonicalizer :: provider :: AliasesV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (locale_canonicalizer :: aliases_v1 :: DATA , key , req) ?) , < :: icu_locale_canonicalizer :: provider :: LikelySubtagsV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_locale_canonicalizer :: provider :: LikelySubtagsV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (locale_canonicalizer :: likelysubtags_v1 :: DATA , key , req) ?) , < :: icu_normalizer :: provider :: CanonicalCompositionPassthroughV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_normalizer :: provider :: CanonicalCompositionPassthroughV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (normalizer :: nfc_v1 :: DATA , key , req) ?) , < :: icu_normalizer :: provider :: CanonicalCompositionsV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_normalizer :: provider :: CanonicalCompositionsV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (normalizer :: comp_v1 :: DATA , key , req) ?) , < :: icu_normalizer :: provider :: CanonicalDecompositionDataV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_normalizer :: provider :: CanonicalDecompositionDataV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (normalizer :: nfd_v1 :: DATA , key , req) ?) , < :: icu_normalizer :: provider :: CanonicalDecompositionTablesV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_normalizer :: provider :: CanonicalDecompositionTablesV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (normalizer :: nfdex_v1 :: DATA , key , req) ?) , < :: icu_normalizer :: provider :: CompatibilityCompositionPassthroughV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_normalizer :: provider :: CompatibilityCompositionPassthroughV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (normalizer :: nfkc_v1 :: DATA , key , req) ?) , < :: icu_normalizer :: provider :: CompatibilityDecompositionSupplementV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_normalizer :: provider :: CompatibilityDecompositionSupplementV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (normalizer :: nfkd_v1 :: DATA , key , req) ?) , < :: icu_normalizer :: provider :: CompatibilityDecompositionTablesV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_normalizer :: provider :: CompatibilityDecompositionTablesV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (normalizer :: nfkdex_v1 :: DATA , key , req) ?) , < :: icu_normalizer :: provider :: Uts46CompositionPassthroughV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_normalizer :: provider :: Uts46CompositionPassthroughV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (normalizer :: uts46_v1 :: DATA , key , req) ?) , < :: icu_normalizer :: provider :: Uts46DecompositionSupplementV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_normalizer :: provider :: Uts46DecompositionSupplementV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (normalizer :: uts46d_v1 :: DATA , key , req) ?) , < :: icu_plurals :: provider :: CardinalV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_plurals :: provider :: CardinalV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (plurals :: cardinal_v1 :: DATA , key , req) ?) , < :: icu_plurals :: provider :: OrdinalV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_plurals :: provider :: OrdinalV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (plurals :: ordinal_v1 :: DATA , key , req) ?) , < :: icu_properties :: provider :: AlphabeticV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_properties :: provider :: AlphabeticV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (props :: alpha_v1 :: DATA , key , req) ?) , < :: icu_properties :: provider :: AsciiHexDigitV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_properties :: provider :: AsciiHexDigitV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (props :: ahex_v1 :: DATA , key , req) ?) , < :: icu_properties :: provider :: BidiClassV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_properties :: provider :: BidiClassV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (props :: bc_v1 :: DATA , key , req) ?) , < :: icu_properties :: provider :: BidiControlV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_properties :: provider :: BidiControlV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (props :: bidi_c_v1 :: DATA , key , req) ?) , < :: icu_properties :: provider :: BidiMirroredV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_properties :: provider :: BidiMirroredV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (props :: bidi_m_v1 :: DATA , key , req) ?) , < :: icu_properties :: provider :: CanonicalCombiningClassV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_properties :: provider :: CanonicalCombiningClassV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (props :: ccc_v1 :: DATA , key , req) ?) , < :: icu_properties :: provider :: CaseIgnorableV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_properties :: provider :: CaseIgnorableV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (props :: ci_v1 :: DATA , key , req) ?) , < :: icu_properties :: provider :: CasedV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_properties :: provider :: CasedV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (props :: cased_v1 :: DATA , key , req) ?) , < :: icu_properties :: provider :: ChangesWhenCasefoldedV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_properties :: provider :: ChangesWhenCasefoldedV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (props :: cwcf_v1 :: DATA , key , req) ?) , < :: icu_properties :: provider :: ChangesWhenLowercasedV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_properties :: provider :: ChangesWhenLowercasedV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (props :: cwl_v1 :: DATA , key , req) ?) , < :: icu_properties :: provider :: ChangesWhenNfkcCasefoldedV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_properties :: provider :: ChangesWhenNfkcCasefoldedV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (props :: cwkcf_v1 :: DATA , key , req) ?) , < :: icu_properties :: provider :: ChangesWhenTitlecasedV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_properties :: provider :: ChangesWhenTitlecasedV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (props :: cwt_v1 :: DATA , key , req) ?) , < :: icu_properties :: provider :: ChangesWhenUppercasedV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_properties :: provider :: ChangesWhenUppercasedV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (props :: cwu_v1 :: DATA , key , req) ?) , < :: icu_properties :: provider :: DashV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_properties :: provider :: DashV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (props :: dash_v1 :: DATA , key , req) ?) , < :: icu_properties :: provider :: DefaultIgnorableCodePointV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_properties :: provider :: DefaultIgnorableCodePointV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (props :: di_v1 :: DATA , key , req) ?) , < :: icu_properties :: provider :: DeprecatedV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_properties :: provider :: DeprecatedV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (props :: dep_v1 :: DATA , key , req) ?) , < :: icu_properties :: provider :: DiacriticV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_properties :: provider :: DiacriticV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (props :: dia_v1 :: DATA , key , req) ?) , < :: icu_properties :: provider :: EastAsianWidthV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_properties :: provider :: EastAsianWidthV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (props :: ea_v1 :: DATA , key , req) ?) , < :: icu_properties :: provider :: EmojiComponentV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_properties :: provider :: EmojiComponentV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (props :: ecomp_v1 :: DATA , key , req) ?) , < :: icu_properties :: provider :: EmojiModifierBaseV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_properties :: provider :: EmojiModifierBaseV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (props :: ebase_v1 :: DATA , key , req) ?) , < :: icu_properties :: provider :: EmojiModifierV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_properties :: provider :: EmojiModifierV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (props :: emod_v1 :: DATA , key , req) ?) , < :: icu_properties :: provider :: EmojiPresentationV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_properties :: provider :: EmojiPresentationV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (props :: epres_v1 :: DATA , key , req) ?) , < :: icu_properties :: provider :: EmojiV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_properties :: provider :: EmojiV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (props :: emoji_v1 :: DATA , key , req) ?) , < :: icu_properties :: provider :: ExtendedPictographicV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_properties :: provider :: ExtendedPictographicV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (props :: extpict_v1 :: DATA , key , req) ?) , < :: icu_properties :: provider :: ExtenderV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_properties :: provider :: ExtenderV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (props :: ext_v1 :: DATA , key , req) ?) , < :: icu_properties :: provider :: GeneralCategoryV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_properties :: provider :: GeneralCategoryV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (props :: gc_v1 :: DATA , key , req) ?) , < :: icu_properties :: provider :: GraphemeBaseV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_properties :: provider :: GraphemeBaseV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (props :: gr_base_v1 :: DATA , key , req) ?) , < :: icu_properties :: provider :: GraphemeClusterBreakV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_properties :: provider :: GraphemeClusterBreakV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (props :: gcb_v1 :: DATA , key , req) ?) , < :: icu_properties :: provider :: GraphemeExtendV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_properties :: provider :: GraphemeExtendV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (props :: gr_ext_v1 :: DATA , key , req) ?) , < :: icu_properties :: provider :: HexDigitV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_properties :: provider :: HexDigitV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (props :: hex_v1 :: DATA , key , req) ?) , < :: icu_properties :: provider :: IdContinueV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_properties :: provider :: IdContinueV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (props :: idc_v1 :: DATA , key , req) ?) , < :: icu_properties :: provider :: IdStartV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_properties :: provider :: IdStartV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (props :: ids_v1 :: DATA , key , req) ?) , < :: icu_properties :: provider :: IdeographicV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_properties :: provider :: IdeographicV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (props :: ideo_v1 :: DATA , key , req) ?) , < :: icu_properties :: provider :: IdsBinaryOperatorV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_properties :: provider :: IdsBinaryOperatorV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (props :: idsb_v1 :: DATA , key , req) ?) , < :: icu_properties :: provider :: IdsTrinaryOperatorV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_properties :: provider :: IdsTrinaryOperatorV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (props :: idst_v1 :: DATA , key , req) ?) , < :: icu_properties :: provider :: JoinControlV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_properties :: provider :: JoinControlV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (props :: join_c_v1 :: DATA , key , req) ?) , < :: icu_properties :: provider :: LineBreakV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_properties :: provider :: LineBreakV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (props :: lb_v1 :: DATA , key , req) ?) , < :: icu_properties :: provider :: LogicalOrderExceptionV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_properties :: provider :: LogicalOrderExceptionV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (props :: loe_v1 :: DATA , key , req) ?) , < :: icu_properties :: provider :: LowercaseV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_properties :: provider :: LowercaseV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (props :: lower_v1 :: DATA , key , req) ?) , < :: icu_properties :: provider :: MathV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_properties :: provider :: MathV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (props :: math_v1 :: DATA , key , req) ?) , < :: icu_properties :: provider :: NoncharacterCodePointV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_properties :: provider :: NoncharacterCodePointV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (props :: nchar_v1 :: DATA , key , req) ?) , < :: icu_properties :: provider :: PatternSyntaxV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_properties :: provider :: PatternSyntaxV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (props :: pat_syn_v1 :: DATA , key , req) ?) , < :: icu_properties :: provider :: PatternWhiteSpaceV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_properties :: provider :: PatternWhiteSpaceV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (props :: pat_ws_v1 :: DATA , key , req) ?) , < :: icu_properties :: provider :: QuotationMarkV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_properties :: provider :: QuotationMarkV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (props :: qmark_v1 :: DATA , key , req) ?) , < :: icu_properties :: provider :: RadicalV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_properties :: provider :: RadicalV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (props :: radical_v1 :: DATA , key , req) ?) , < :: icu_properties :: provider :: RegionalIndicatorV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_properties :: provider :: RegionalIndicatorV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (props :: ri_v1 :: DATA , key , req) ?) , < :: icu_properties :: provider :: ScriptV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_properties :: provider :: ScriptV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (props :: sc_v1 :: DATA , key , req) ?) , < :: icu_properties :: provider :: ScriptWithExtensionsPropertyV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_properties :: provider :: ScriptWithExtensionsPropertyV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (props :: scx_v1 :: DATA , key , req) ?) , < :: icu_properties :: provider :: SentenceBreakV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_properties :: provider :: SentenceBreakV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (props :: sb_v1 :: DATA , key , req) ?) , < :: icu_properties :: provider :: SentenceTerminalV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_properties :: provider :: SentenceTerminalV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (props :: sterm_v1 :: DATA , key , req) ?) , < :: icu_properties :: provider :: SoftDottedV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_properties :: provider :: SoftDottedV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (props :: sd_v1 :: DATA , key , req) ?) , < :: icu_properties :: provider :: TerminalPunctuationV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_properties :: provider :: TerminalPunctuationV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (props :: term_v1 :: DATA , key , req) ?) , < :: icu_properties :: provider :: UnifiedIdeographV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_properties :: provider :: UnifiedIdeographV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (props :: uideo_v1 :: DATA , key , req) ?) , < :: icu_properties :: provider :: UppercaseV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_properties :: provider :: UppercaseV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (props :: upper_v1 :: DATA , key , req) ?) , < :: icu_properties :: provider :: VariationSelectorV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_properties :: provider :: VariationSelectorV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (props :: vs_v1 :: DATA , key , req) ?) , < :: icu_properties :: provider :: WhiteSpaceV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_properties :: provider :: WhiteSpaceV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (props :: wspace_v1 :: DATA , key , req) ?) , < :: icu_properties :: provider :: WordBreakV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_properties :: provider :: WordBreakV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (props :: wb_v1 :: DATA , key , req) ?) , < :: icu_properties :: provider :: XidContinueV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_properties :: provider :: XidContinueV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (props :: xidc_v1 :: DATA , key , req) ?) , < :: icu_properties :: provider :: XidStartV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_properties :: provider :: XidStartV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (props :: xids_v1 :: DATA , key , req) ?) , < :: icu_provider_adapters :: fallback :: provider :: LocaleFallbackLikelySubtagsV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_provider_adapters :: fallback :: provider :: LocaleFallbackLikelySubtagsV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (fallback :: likelysubtags_v1 :: DATA , key , req) ?) , < :: icu_provider_adapters :: fallback :: provider :: LocaleFallbackParentsV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_provider_adapters :: fallback :: provider :: LocaleFallbackParentsV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (fallback :: parents_v1 :: DATA , key , req) ?) , < :: icu_segmenter :: provider :: GraphemeClusterBreakDataV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_segmenter :: provider :: GraphemeClusterBreakDataV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (segmenter :: grapheme_v1 :: DATA , key , req) ?) , < :: icu_segmenter :: provider :: LineBreakDataV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_segmenter :: provider :: LineBreakDataV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (segmenter :: line_v1 :: DATA , key , req) ?) , < :: icu_segmenter :: provider :: SentenceBreakDataV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_segmenter :: provider :: SentenceBreakDataV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (segmenter :: sentence_v1 :: DATA , key , req) ?) , < :: icu_segmenter :: provider :: WordBreakDataV1Marker as :: icu_provider :: ResourceMarker > :: KEY => :: icu_provider :: AnyPayload :: from_static_ref :: << :: icu_segmenter :: provider :: WordBreakDataV1Marker as :: icu_provider :: DataMarker > :: Yokeable > (litemap_slice_get (segmenter :: word_v1 :: DATA , key , req) ?) , _ => return Err (:: icu_provider :: DataErrorKind :: MissingResourceKey . with_req (key , req)) , }) , metadata : Default :: default () , }) } } } ; ($ name : ident) => { # [doc = r" This data provider was programmatically generated by [`icu_datagen`]("] # [doc = r" https://unicode-org.github.io/icu4x-docs/doc/icu_datagen/enum.Out.html#variant.Module)."] # [non_exhaustive] pub struct $ name ; fn litemap_slice_get < T : ? Sized > (values : & 'static [(& 'static str , & 'static T)] , key : :: icu_provider :: ResourceKey , req : & :: icu_provider :: DataRequest ,) -> Result < & 'static T , :: icu_provider :: DataError > { # [allow (clippy :: unwrap_used)] values . binary_search_by (| (k , _) | req . options . strict_cmp (k . as_bytes ()) . reverse ()) . map (| i | values . get (i) . unwrap () . 1) . map_err (| _ | :: icu_provider :: DataErrorKind :: MissingResourceOptions . with_req (key , req)) } macro_rules ! impl_resource_provider { ($ marker : ty , $ data : expr) => { impl :: icu_provider :: ResourceProvider < $ marker > for $ name { fn load_resource (& self , req : & :: icu_provider :: DataRequest ,) -> Result < :: icu_provider :: DataResponse < $ marker > , :: icu_provider :: DataError > { Ok (:: icu_provider :: DataResponse { metadata : :: icu_provider :: DataResponseMetadata :: default () , payload : Some (:: icu_provider :: DataPayload :: from_owned (:: icu_provider :: zerofrom :: ZeroFrom :: zero_from (litemap_slice_get ($ data , < $ marker as :: icu_provider :: ResourceMarker > :: KEY , req) ? ,))) , }) } } } ; } impl_resource_provider ! (:: icu_calendar :: provider :: JapaneseErasV1Marker , calendar :: japanese_v1 :: DATA) ; impl_resource_provider ! (:: icu_casemapping :: provider :: CaseMappingV1Marker , props :: casemap_v1 :: DATA) ; impl_resource_provider ! (:: icu_collator :: provider :: CollationDataV1Marker , collator :: data_v1 :: DATA) ; impl_resource_provider ! (:: icu_collator :: provider :: CollationDiacriticsV1Marker , collator :: dia_v1 :: DATA) ; impl_resource_provider ! (:: icu_collator :: provider :: CollationJamoV1Marker , collator :: jamo_v1 :: DATA) ; impl_resource_provider ! (:: icu_collator :: provider :: CollationMetadataV1Marker , collator :: meta_v1 :: DATA) ; impl_resource_provider ! (:: icu_collator :: provider :: CollationReorderingV1Marker , collator :: reord_v1 :: DATA) ; impl_resource_provider ! (:: icu_collator :: provider :: CollationSpecialPrimariesV1Marker , collator :: prim_v1 :: DATA) ; impl_resource_provider ! (:: icu_datetime :: provider :: calendar :: DatePatternsV1Marker , datetime :: lengths_v1 :: DATA) ; impl_resource_provider ! (:: icu_datetime :: provider :: calendar :: DateSkeletonPatternsV1Marker , datetime :: skeletons_v1 :: DATA) ; impl_resource_provider ! (:: icu_datetime :: provider :: calendar :: DateSymbolsV1Marker , datetime :: symbols_v1 :: DATA) ; impl_resource_provider ! (:: icu_datetime :: provider :: time_zones :: ExemplarCitiesV1Marker , time_zone :: exemplar_cities_v1 :: DATA) ; impl_resource_provider ! (:: icu_datetime :: provider :: time_zones :: MetaZoneGenericNamesLongV1Marker , time_zone :: generic_long_v1 :: DATA) ; impl_resource_provider ! (:: icu_datetime :: provider :: time_zones :: MetaZoneGenericNamesShortV1Marker , time_zone :: generic_short_v1 :: DATA) ; impl_resource_provider ! (:: icu_datetime :: provider :: time_zones :: MetaZonePeriodV1Marker , time_zone :: metazone_period_v1 :: DATA) ; impl_resource_provider ! (:: icu_datetime :: provider :: time_zones :: MetaZoneSpecificNamesLongV1Marker , time_zone :: specific_long_v1 :: DATA) ; impl_resource_provider ! (:: icu_datetime :: provider :: time_zones :: MetaZoneSpecificNamesShortV1Marker , time_zone :: specific_short_v1 :: DATA) ; impl_resource_provider ! (:: icu_datetime :: provider :: time_zones :: TimeZoneFormatsV1Marker , time_zone :: formats_v1 :: DATA) ; impl_resource_provider ! (:: icu_datetime :: provider :: week_data :: WeekDataV1Marker , datetime :: week_data_v1 :: DATA) ; impl_resource_provider ! (:: icu_decimal :: provider :: DecimalSymbolsV1Marker , decimal :: symbols_v1 :: DATA) ; impl_resource_provider ! (:: icu_list :: provider :: AndListV1Marker , list :: and_v1 :: DATA) ; impl_resource_provider ! (:: icu_list :: provider :: OrListV1Marker , list :: or_v1 :: DATA) ; impl_resource_provider ! (:: icu_list :: provider :: UnitListV1Marker , list :: unit_v1 :: DATA) ; impl_resource_provider ! (:: icu_locale_canonicalizer :: provider :: AliasesV1Marker , locale_canonicalizer :: aliases_v1 :: DATA) ; impl_resource_provider ! (:: icu_locale_canonicalizer :: provider :: LikelySubtagsV1Marker , locale_canonicalizer :: likelysubtags_v1 :: DATA) ; impl_resource_provider ! (:: icu_normalizer :: provider :: CanonicalCompositionPassthroughV1Marker , normalizer :: nfc_v1 :: DATA) ; impl_resource_provider ! (:: icu_normalizer :: provider :: CanonicalCompositionsV1Marker , normalizer :: comp_v1 :: DATA) ; impl_resource_provider ! (:: icu_normalizer :: provider :: CanonicalDecompositionDataV1Marker , normalizer :: nfd_v1 :: DATA) ; impl_resource_provider ! (:: icu_normalizer :: provider :: CanonicalDecompositionTablesV1Marker , normalizer :: nfdex_v1 :: DATA) ; impl_resource_provider ! (:: icu_normalizer :: provider :: CompatibilityCompositionPassthroughV1Marker , normalizer :: nfkc_v1 :: DATA) ; impl_resource_provider ! (:: icu_normalizer :: provider :: CompatibilityDecompositionSupplementV1Marker , normalizer :: nfkd_v1 :: DATA) ; impl_resource_provider ! (:: icu_normalizer :: provider :: CompatibilityDecompositionTablesV1Marker , normalizer :: nfkdex_v1 :: DATA) ; impl_resource_provider ! (:: icu_normalizer :: provider :: Uts46CompositionPassthroughV1Marker , normalizer :: uts46_v1 :: DATA) ; impl_resource_provider ! (:: icu_normalizer :: provider :: Uts46DecompositionSupplementV1Marker , normalizer :: uts46d_v1 :: DATA) ; impl_resource_provider ! (:: icu_plurals :: provider :: CardinalV1Marker , plurals :: cardinal_v1 :: DATA) ; impl_resource_provider ! (:: icu_plurals :: provider :: OrdinalV1Marker , plurals :: ordinal_v1 :: DATA) ; impl_resource_provider ! (:: icu_properties :: provider :: AlphabeticV1Marker , props :: alpha_v1 :: DATA) ; impl_resource_provider ! (:: icu_properties :: provider :: AsciiHexDigitV1Marker , props :: ahex_v1 :: DATA) ; impl_resource_provider ! (:: icu_properties :: provider :: BidiClassV1Marker , props :: bc_v1 :: DATA) ; impl_resource_provider ! (:: icu_properties :: provider :: BidiControlV1Marker , props :: bidi_c_v1 :: DATA) ; impl_resource_provider ! (:: icu_properties :: provider :: BidiMirroredV1Marker , props :: bidi_m_v1 :: DATA) ; impl_resource_provider ! (:: icu_properties :: provider :: CanonicalCombiningClassV1Marker , props :: ccc_v1 :: DATA) ; impl_resource_provider ! (:: icu_properties :: provider :: CaseIgnorableV1Marker , props :: ci_v1 :: DATA) ; impl_resource_provider ! (:: icu_properties :: provider :: CasedV1Marker , props :: cased_v1 :: DATA) ; impl_resource_provider ! (:: icu_properties :: provider :: ChangesWhenCasefoldedV1Marker , props :: cwcf_v1 :: DATA) ; impl_resource_provider ! (:: icu_properties :: provider :: ChangesWhenLowercasedV1Marker , props :: cwl_v1 :: DATA) ; impl_resource_provider ! (:: icu_properties :: provider :: ChangesWhenNfkcCasefoldedV1Marker , props :: cwkcf_v1 :: DATA) ; impl_resource_provider ! (:: icu_properties :: provider :: ChangesWhenTitlecasedV1Marker , props :: cwt_v1 :: DATA) ; impl_resource_provider ! (:: icu_properties :: provider :: ChangesWhenUppercasedV1Marker , props :: cwu_v1 :: DATA) ; impl_resource_provider ! (:: icu_properties :: provider :: DashV1Marker , props :: dash_v1 :: DATA) ; impl_resource_provider ! (:: icu_properties :: provider :: DefaultIgnorableCodePointV1Marker , props :: di_v1 :: DATA) ; impl_resource_provider ! (:: icu_properties :: provider :: DeprecatedV1Marker , props :: dep_v1 :: DATA) ; impl_resource_provider ! (:: icu_properties :: provider :: DiacriticV1Marker , props :: dia_v1 :: DATA) ; impl_resource_provider ! (:: icu_properties :: provider :: EastAsianWidthV1Marker , props :: ea_v1 :: DATA) ; impl_resource_provider ! (:: icu_properties :: provider :: EmojiComponentV1Marker , props :: ecomp_v1 :: DATA) ; impl_resource_provider ! (:: icu_properties :: provider :: EmojiModifierBaseV1Marker , props :: ebase_v1 :: DATA) ; impl_resource_provider ! (:: icu_properties :: provider :: EmojiModifierV1Marker , props :: emod_v1 :: DATA) ; impl_resource_provider ! (:: icu_properties :: provider :: EmojiPresentationV1Marker , props :: epres_v1 :: DATA) ; impl_resource_provider ! (:: icu_properties :: provider :: EmojiV1Marker , props :: emoji_v1 :: DATA) ; impl_resource_provider ! (:: icu_properties :: provider :: ExtendedPictographicV1Marker , props :: extpict_v1 :: DATA) ; impl_resource_provider ! (:: icu_properties :: provider :: ExtenderV1Marker , props :: ext_v1 :: DATA) ; impl_resource_provider ! (:: icu_properties :: provider :: GeneralCategoryV1Marker , props :: gc_v1 :: DATA) ; impl_resource_provider ! (:: icu_properties :: provider :: GraphemeBaseV1Marker , props :: gr_base_v1 :: DATA) ; impl_resource_provider ! (:: icu_properties :: provider :: GraphemeClusterBreakV1Marker , props :: gcb_v1 :: DATA) ; impl_resource_provider ! (:: icu_properties :: provider :: GraphemeExtendV1Marker , props :: gr_ext_v1 :: DATA) ; impl_resource_provider ! (:: icu_properties :: provider :: HexDigitV1Marker , props :: hex_v1 :: DATA) ; impl_resource_provider ! (:: icu_properties :: provider :: IdContinueV1Marker , props :: idc_v1 :: DATA) ; impl_resource_provider ! (:: icu_properties :: provider :: IdStartV1Marker , props :: ids_v1 :: DATA) ; impl_resource_provider ! (:: icu_properties :: provider :: IdeographicV1Marker , props :: ideo_v1 :: DATA) ; impl_resource_provider ! (:: icu_properties :: provider :: IdsBinaryOperatorV1Marker , props :: idsb_v1 :: DATA) ; impl_resource_provider ! (:: icu_properties :: provider :: IdsTrinaryOperatorV1Marker , props :: idst_v1 :: DATA) ; impl_resource_provider ! (:: icu_properties :: provider :: JoinControlV1Marker , props :: join_c_v1 :: DATA) ; impl_resource_provider ! (:: icu_properties :: provider :: LineBreakV1Marker , props :: lb_v1 :: DATA) ; impl_resource_provider ! (:: icu_properties :: provider :: LogicalOrderExceptionV1Marker , props :: loe_v1 :: DATA) ; impl_resource_provider ! (:: icu_properties :: provider :: LowercaseV1Marker , props :: lower_v1 :: DATA) ; impl_resource_provider ! (:: icu_properties :: provider :: MathV1Marker , props :: math_v1 :: DATA) ; impl_resource_provider ! (:: icu_properties :: provider :: NoncharacterCodePointV1Marker , props :: nchar_v1 :: DATA) ; impl_resource_provider ! (:: icu_properties :: provider :: PatternSyntaxV1Marker , props :: pat_syn_v1 :: DATA) ; impl_resource_provider ! (:: icu_properties :: provider :: PatternWhiteSpaceV1Marker , props :: pat_ws_v1 :: DATA) ; impl_resource_provider ! (:: icu_properties :: provider :: QuotationMarkV1Marker , props :: qmark_v1 :: DATA) ; impl_resource_provider ! (:: icu_properties :: provider :: RadicalV1Marker , props :: radical_v1 :: DATA) ; impl_resource_provider ! (:: icu_properties :: provider :: RegionalIndicatorV1Marker , props :: ri_v1 :: DATA) ; impl_resource_provider ! (:: icu_properties :: provider :: ScriptV1Marker , props :: sc_v1 :: DATA) ; impl_resource_provider ! (:: icu_properties :: provider :: ScriptWithExtensionsPropertyV1Marker , props :: scx_v1 :: DATA) ; impl_resource_provider ! (:: icu_properties :: provider :: SentenceBreakV1Marker , props :: sb_v1 :: DATA) ; impl_resource_provider ! (:: icu_properties :: provider :: SentenceTerminalV1Marker , props :: sterm_v1 :: DATA) ; impl_resource_provider ! (:: icu_properties :: provider :: SoftDottedV1Marker , props :: sd_v1 :: DATA) ; impl_resource_provider ! (:: icu_properties :: provider :: TerminalPunctuationV1Marker , props :: term_v1 :: DATA) ; impl_resource_provider ! (:: icu_properties :: provider :: UnifiedIdeographV1Marker , props :: uideo_v1 :: DATA) ; impl_resource_provider ! (:: icu_properties :: provider :: UppercaseV1Marker , props :: upper_v1 :: DATA) ; impl_resource_provider ! (:: icu_properties :: provider :: VariationSelectorV1Marker , props :: vs_v1 :: DATA) ; impl_resource_provider ! (:: icu_properties :: provider :: WhiteSpaceV1Marker , props :: wspace_v1 :: DATA) ; impl_resource_provider ! (:: icu_properties :: provider :: WordBreakV1Marker , props :: wb_v1 :: DATA) ; impl_resource_provider ! (:: icu_properties :: provider :: XidContinueV1Marker , props :: xidc_v1 :: DATA) ; impl_resource_provider ! (:: icu_properties :: provider :: XidStartV1Marker , props :: xids_v1 :: DATA) ; impl_resource_provider ! (:: icu_provider_adapters :: fallback :: provider :: LocaleFallbackLikelySubtagsV1Marker , fallback :: likelysubtags_v1 :: DATA) ; impl_resource_provider ! (:: icu_provider_adapters :: fallback :: provider :: LocaleFallbackParentsV1Marker , fallback :: parents_v1 :: DATA) ; impl_resource_provider ! (:: icu_segmenter :: provider :: GraphemeClusterBreakDataV1Marker , segmenter :: grapheme_v1 :: DATA) ; impl_resource_provider ! (:: icu_segmenter :: provider :: LineBreakDataV1Marker , segmenter :: line_v1 :: DATA) ; impl_resource_provider ! (:: icu_segmenter :: provider :: SentenceBreakDataV1Marker , segmenter :: sentence_v1 :: DATA) ; impl_resource_provider ! (:: icu_segmenter :: provider :: WordBreakDataV1Marker , segmenter :: word_v1 :: DATA) ; } }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: also doesn't look good

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prettyplease can't handle this either

provider/datagen/src/databake.rs Show resolved Hide resolved
provider/datagen/src/databake.rs Outdated Show resolved Hide resolved
@jira-pull-request-webhook
Copy link

Notice: the branch changed across the force-push!

  • provider/datagen/src/databake.rs is different
  • provider/testdata/data/baked/any.rs is now changed in the branch
  • provider/testdata/data/baked/mod.rs is different
  • provider/testdata/src/lib.rs is different

View Diff Across Force-Push

~ Your Friendly Jira-GitHub PR Checker Bot

@robertbastian
Copy link
Member Author

rustfmt still can't handle the any implementation even without the macro :(

@Manishearth
Copy link
Member

Please file a bug on rustfmt about it.

In the meantime, can we just avoid quote here and use write or something? Ideally with a way of displaying paths that doesn't have those spaces, that's half of what's choking rustfmt.

reduced testcase:

    match key {
        < :: icu_calendar :: provider :: JapaneseErasV1Marker as ResourceMarker > :: KEY => {
        AnyPayload :: from_static_ref :: << :: icu_calendar :: provider :: JapaneseErasV1Marker as DataMarker > :: Yokeable > (litemap_slice_get (calendar :: japanese_v1 :: DATA , key , req) ?)
        }
    }

@Manishearth
Copy link
Member

actually I'll file one

@Manishearth
Copy link
Member

rust-lang/rustfmt#5422

@robertbastian
Copy link
Member Author

Even after replacing all <space>::<space> with :: and inserting new lines after each case rustfmt doesn't do anything

@robertbastian
Copy link
Member Author

It can handle three cases (even with :: and no newlines), after the fourth I guess the expression gets too long and it gives up.

@Manishearth
Copy link
Member

Turns out the bug was a missing --edition=2021

@Manishearth
Copy link
Member

I suspect even the macro version will work with the edition flag set.

@Manishearth
Copy link
Member

Hmm, nope, it's unable to format it

@robertbastian
Copy link
Member Author

--edition=2021 doesn't work for me on the current code in this PR

@Manishearth
Copy link
Member

Even after replacing all <space>::<space> with :: and inserting new lines after each case rustfmt doesn't do anything

Can we just land with this change made? That would at least be more readable.

Manishearth
Manishearth previously approved these changes Jun 30, 2022
Copy link
Member

@Manishearth Manishearth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

provider/datagen/src/databake.rs Show resolved Hide resolved
@robertbastian
Copy link
Member Author

please merge after approval

@robertbastian robertbastian merged commit fdfe48e into unicode-org:main Jul 1, 2022
Copy link
Member

@sffc sffc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

samchen61661 pushed a commit to samchen61661/icu4x that referenced this pull request Jul 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BakedDataProvider should implement AnyProvider
3 participants