Source code

Revision control

Copy as Markdown

Other Tools

// @generated
include ! ("macros.rs") ; macro_rules ! impl_data_provider { ($ provider : ty) => { make_provider ! ($ provider) ; impl_segmenter_dictionary_w_auto_v1 ! ($ provider) ; impl_segmenter_dictionary_wl_ext_v1 ! ($ provider) ; impl_segmenter_grapheme_v1 ! ($ provider) ; impl_segmenter_line_v1 ! ($ provider) ; impl_segmenter_lstm_wl_auto_v1 ! ($ provider) ; impl_segmenter_sentence_v1 ! ($ provider) ; impl_segmenter_word_v1 ! ($ provider) ; } ; } # [allow (unused_macros)] macro_rules ! impl_any_provider { ($ provider : ty) => { # [clippy :: msrv = "1.67"] impl icu_provider :: AnyProvider for $ provider { fn load_any (& self , key : icu_provider :: DataKey , req : icu_provider :: DataRequest) -> Result < icu_provider :: AnyResponse , icu_provider :: DataError > { match key . hashed () { h if h == < icu::segmenter :: provider :: DictionaryForWordOnlyAutoV1Marker as icu_provider :: KeyedDataMarker > :: KEY . hashed () => icu_provider :: DataProvider :: < icu::segmenter :: provider :: DictionaryForWordOnlyAutoV1Marker > :: load (self , req) . map (icu_provider :: DataResponse :: wrap_into_any_response) , h if h == < icu::segmenter :: provider :: DictionaryForWordLineExtendedV1Marker as icu_provider :: KeyedDataMarker > :: KEY . hashed () => icu_provider :: DataProvider :: < icu::segmenter :: provider :: DictionaryForWordLineExtendedV1Marker > :: load (self , req) . map (icu_provider :: DataResponse :: wrap_into_any_response) , h if h == < icu::segmenter :: provider :: GraphemeClusterBreakDataV1Marker as icu_provider :: KeyedDataMarker > :: KEY . hashed () => icu_provider :: DataProvider :: < icu::segmenter :: provider :: GraphemeClusterBreakDataV1Marker > :: load (self , req) . map (icu_provider :: DataResponse :: wrap_into_any_response) , h if h == < icu::segmenter :: provider :: LineBreakDataV1Marker as icu_provider :: KeyedDataMarker > :: KEY . hashed () => icu_provider :: DataProvider :: < icu::segmenter :: provider :: LineBreakDataV1Marker > :: load (self , req) . map (icu_provider :: DataResponse :: wrap_into_any_response) , h if h == < icu::segmenter :: provider :: LstmForWordLineAutoV1Marker as icu_provider :: KeyedDataMarker > :: KEY . hashed () => icu_provider :: DataProvider :: < icu::segmenter :: provider :: LstmForWordLineAutoV1Marker > :: load (self , req) . map (icu_provider :: DataResponse :: wrap_into_any_response) , h if h == < icu::segmenter :: provider :: SentenceBreakDataV1Marker as icu_provider :: KeyedDataMarker > :: KEY . hashed () => icu_provider :: DataProvider :: < icu::segmenter :: provider :: SentenceBreakDataV1Marker > :: load (self , req) . map (icu_provider :: DataResponse :: wrap_into_any_response) , h if h == < icu::segmenter :: provider :: WordBreakDataV1Marker as icu_provider :: KeyedDataMarker > :: KEY . hashed () => icu_provider :: DataProvider :: < icu::segmenter :: provider :: WordBreakDataV1Marker > :: load (self , req) . map (icu_provider :: DataResponse :: wrap_into_any_response) , _ => Err (icu_provider :: DataErrorKind :: MissingDataKey . with_req (key , req)) , } } } } } # [clippy :: msrv = "1.67"] pub struct BakedDataProvider ; impl_data_provider ! (BakedDataProvider) ;