icu_provider

Trait DynamicDataMarker

Source
pub trait DynamicDataMarker: 'static {
    type DataStruct: for<'a> Yokeable<'a>;
}
Expand description

Trait marker for data structs. All types delivered by the data provider must be associated with something implementing this trait.

Data markers normally generated with the data_marker macro.

Also see DataMarker.

Note: DynamicDataMarkers are quasi-const-generic compile-time objects, and as such are expected to be unit structs. As this is not something that can be enforced by the type system, we currently only have a 'static bound on them (which is needed by a lot of our code).

§Examples

Manually implementing DynamicDataMarker for a custom type:

use icu_provider::prelude::*;
use std::borrow::Cow;

#[derive(yoke::Yokeable, zerofrom::ZeroFrom)]
struct MyDataStruct<'data> {
    message: Cow<'data, str>,
}

struct MyDataStructMarker;

impl DynamicDataMarker for MyDataStructMarker {
    type DataStruct = MyDataStruct<'static>;
}

// We can now use MyDataStruct with DataProvider:
let s = MyDataStruct {
    message: Cow::Owned("Hello World".into()),
};
let payload = DataPayload::<MyDataStructMarker>::from_owned(s);
assert_eq!(payload.get().message, "Hello World");

Required Associated Types§

Source

type DataStruct: for<'a> Yokeable<'a>

A type that implements [Yokeable]. This should typically be the 'static version of a data struct.

Implementors§

Source§

impl DynamicDataMarker for BufferMarker

Source§

type DataStruct = &'static [u8]

Source§

impl DynamicDataMarker for ExportMarker

Source§

type DataStruct = ExportBox

Source§

impl DynamicDataMarker for HelloWorldV1

Source§

impl<DataStruct: for<'a> Yokeable<'a>> DynamicDataMarker for ErasedMarker<DataStruct>

Source§

type DataStruct = DataStruct

Source§

impl<Y> DynamicDataMarker for NeverMarker<Y>
where for<'a> Y: Yokeable<'a>,

impl DynamicDataMarker for CalendarChineseV1

impl DynamicDataMarker for CalendarDangiV1

impl DynamicDataMarker for CalendarHijriObservationalV1

impl DynamicDataMarker for CalendarHijriUmmalquraV1

impl DynamicDataMarker for CalendarJapaneseExtendedV1

impl DynamicDataMarker for CalendarJapaneseModernV1

impl DynamicDataMarker for CalendarWeekV1

impl DynamicDataMarker for CaseMapUnfoldV1

impl DynamicDataMarker for CaseMapV1

impl DynamicDataMarker for CollationDiacriticsV1

impl DynamicDataMarker for CollationJamoV1

impl DynamicDataMarker for CollationMetadataV1

impl DynamicDataMarker for CollationReorderingV1

impl DynamicDataMarker for CollationRootV1

impl DynamicDataMarker for CollationSpecialPrimariesV1

impl DynamicDataMarker for CollationTailoringV1

impl DynamicDataMarker for BuddhistDateLengthsV1

impl DynamicDataMarker for BuddhistDateSymbolsV1

impl DynamicDataMarker for ChineseDateLengthsV1

impl DynamicDataMarker for ChineseDateSymbolsV1

impl DynamicDataMarker for CopticDateLengthsV1

impl DynamicDataMarker for CopticDateSymbolsV1

impl DynamicDataMarker for DangiDateLengthsV1

impl DynamicDataMarker for DangiDateSymbolsV1

impl DynamicDataMarker for EthiopianDateLengthsV1

impl DynamicDataMarker for EthiopianDateSymbolsV1

impl DynamicDataMarker for GregorianDateLengthsV1

impl DynamicDataMarker for GregorianDateSymbolsV1

impl DynamicDataMarker for HebrewDateLengthsV1

impl DynamicDataMarker for HebrewDateSymbolsV1

impl DynamicDataMarker for HijriDateLengthsV1

impl DynamicDataMarker for HijriDateSymbolsV1

impl DynamicDataMarker for IndianDateLengthsV1

impl DynamicDataMarker for IndianDateSymbolsV1

impl DynamicDataMarker for JapaneseDateLengthsV1

impl DynamicDataMarker for JapaneseDateSymbolsV1

impl DynamicDataMarker for JapaneseExtendedDateLengthsV1

impl DynamicDataMarker for JapaneseExtendedDateSymbolsV1

impl DynamicDataMarker for PersianDateLengthsV1

impl DynamicDataMarker for PersianDateSymbolsV1

impl DynamicDataMarker for RocDateLengthsV1

impl DynamicDataMarker for RocDateSymbolsV1

impl DynamicDataMarker for TimeLengthsV1

impl DynamicDataMarker for TimeSymbolsV1

impl DynamicDataMarker for BuddhistMonthNamesV1

impl DynamicDataMarker for BuddhistYearNamesV1

impl DynamicDataMarker for ChineseDayNamesV1

impl DynamicDataMarker for ChineseMonthNamesV1

impl DynamicDataMarker for ChineseYearNamesV1

impl DynamicDataMarker for CopticMonthNamesV1

impl DynamicDataMarker for CopticYearNamesV1

impl DynamicDataMarker for DangiDayNamesV1

impl DynamicDataMarker for DangiMonthNamesV1

impl DynamicDataMarker for DangiYearNamesV1

impl DynamicDataMarker for DateTimeSkeletonPatternsV1

impl DynamicDataMarker for DayPeriodNamesV1

impl DynamicDataMarker for EthiopianMonthNamesV1

impl DynamicDataMarker for EthiopianYearNamesV1

impl DynamicDataMarker for GluePatternV1

impl DynamicDataMarker for GregorianMonthNamesV1

impl DynamicDataMarker for GregorianYearNamesV1

impl DynamicDataMarker for HebrewMonthNamesV1

impl DynamicDataMarker for HebrewYearNamesV1

impl DynamicDataMarker for HijriMonthNamesV1

impl DynamicDataMarker for HijriYearNamesV1

impl DynamicDataMarker for IndianMonthNamesV1

impl DynamicDataMarker for IndianYearNamesV1

impl DynamicDataMarker for JapaneseExtendedMonthNamesV1

impl DynamicDataMarker for JapaneseExtendedYearNamesV1

impl DynamicDataMarker for JapaneseMonthNamesV1

impl DynamicDataMarker for JapaneseYearNamesV1

impl DynamicDataMarker for MonthNamesV1

impl DynamicDataMarker for PersianMonthNamesV1

impl DynamicDataMarker for PersianYearNamesV1

impl DynamicDataMarker for PlaceholderDayNamesV1

impl DynamicDataMarker for RocMonthNamesV1

impl DynamicDataMarker for RocYearNamesV1

impl DynamicDataMarker for WeekdayNamesV1

impl DynamicDataMarker for YearNamesV1

impl DynamicDataMarker for BuddhistDateNeoSkeletonPatternsV1

impl DynamicDataMarker for ChineseDateNeoSkeletonPatternsV1

impl DynamicDataMarker for CopticDateNeoSkeletonPatternsV1

impl DynamicDataMarker for DangiDateNeoSkeletonPatternsV1

impl DynamicDataMarker for EthiopianDateNeoSkeletonPatternsV1

impl DynamicDataMarker for GregorianDateNeoSkeletonPatternsV1

impl DynamicDataMarker for HebrewDateNeoSkeletonPatternsV1

impl DynamicDataMarker for HijriDateNeoSkeletonPatternsV1

impl DynamicDataMarker for IndianDateNeoSkeletonPatternsV1

impl DynamicDataMarker for JapaneseDateNeoSkeletonPatternsV1

impl DynamicDataMarker for PersianDateNeoSkeletonPatternsV1

impl DynamicDataMarker for RocDateNeoSkeletonPatternsV1

impl DynamicDataMarker for TimeNeoSkeletonPatternsV1

impl DynamicDataMarker for ExemplarCitiesRootV1

impl DynamicDataMarker for ExemplarCitiesV1

impl DynamicDataMarker for LocationsRootV1

impl DynamicDataMarker for LocationsV1

impl DynamicDataMarker for MetazoneGenericNamesLongV1

impl DynamicDataMarker for MetazoneGenericNamesShortV1

impl DynamicDataMarker for MetazonePeriodV1

impl DynamicDataMarker for MetazoneSpecificNamesLongV1

impl DynamicDataMarker for MetazoneSpecificNamesShortV1

impl DynamicDataMarker for MetazoneStandardNamesLongV1

impl DynamicDataMarker for TimeZoneEssentialsV1

impl DynamicDataMarker for DecimalDigitsV1

impl DynamicDataMarker for DecimalSymbolsV1

impl DynamicDataMarker for LongCompactDecimalFormatDataV1

impl DynamicDataMarker for ShortCompactDecimalFormatDataV1

impl DynamicDataMarker for CurrencyEssentialsV1

impl DynamicDataMarker for ShortCurrencyCompactV1

impl DynamicDataMarker for CurrencyDisplaynameV1

impl DynamicDataMarker for CurrencyPatternsDataV1

impl DynamicDataMarker for CurrencyExtendedDataV1

impl DynamicDataMarker for PercentEssentialsV1

impl DynamicDataMarker for UnitsDisplayNameV1

impl DynamicDataMarker for UnitsEssentialsV1

impl DynamicDataMarker for LanguageDisplayNamesV1

impl DynamicDataMarker for LocaleDisplayNamesV1

impl DynamicDataMarker for RegionDisplayNamesV1

impl DynamicDataMarker for ScriptDisplayNamesV1

impl DynamicDataMarker for VariantDisplayNamesV1

impl DynamicDataMarker for DigitalDurationDataV1

impl DynamicDataMarker for UnitsTrieV1

impl DynamicDataMarker for PersonNamesFormatV1

impl DynamicDataMarker for LongDayRelativeV1

impl DynamicDataMarker for LongHourRelativeV1

impl DynamicDataMarker for LongMinuteRelativeV1

impl DynamicDataMarker for LongMonthRelativeV1

impl DynamicDataMarker for LongQuarterRelativeV1

impl DynamicDataMarker for LongSecondRelativeV1

impl DynamicDataMarker for LongWeekRelativeV1

impl DynamicDataMarker for LongYearRelativeV1

impl DynamicDataMarker for NarrowDayRelativeV1

impl DynamicDataMarker for NarrowHourRelativeV1

impl DynamicDataMarker for NarrowMinuteRelativeV1

impl DynamicDataMarker for NarrowMonthRelativeV1

impl DynamicDataMarker for NarrowQuarterRelativeV1

impl DynamicDataMarker for NarrowSecondRelativeV1

impl DynamicDataMarker for NarrowWeekRelativeV1

impl DynamicDataMarker for NarrowYearRelativeV1

impl DynamicDataMarker for ShortDayRelativeV1

impl DynamicDataMarker for ShortHourRelativeV1

impl DynamicDataMarker for ShortMinuteRelativeV1

impl DynamicDataMarker for ShortMonthRelativeV1

impl DynamicDataMarker for ShortQuarterRelativeV1

impl DynamicDataMarker for ShortSecondRelativeV1

impl DynamicDataMarker for ShortWeekRelativeV1

impl DynamicDataMarker for ShortYearRelativeV1

impl DynamicDataMarker for TransliteratorRulesV1

impl DynamicDataMarker for UnitsInfoV1

impl DynamicDataMarker for ListAndV1

impl DynamicDataMarker for ListOrV1

impl DynamicDataMarker for ListUnitV1

impl DynamicDataMarker for LocaleAliasesV1

impl DynamicDataMarker for LocaleExemplarCharactersAuxiliaryV1

impl DynamicDataMarker for LocaleExemplarCharactersIndexV1

impl DynamicDataMarker for LocaleExemplarCharactersMainV1

impl DynamicDataMarker for LocaleExemplarCharactersNumbersV1

impl DynamicDataMarker for LocaleExemplarCharactersPunctuationV1

impl DynamicDataMarker for LocaleLikelySubtagsExtendedV1

impl DynamicDataMarker for LocaleLikelySubtagsLanguageV1

impl DynamicDataMarker for LocaleLikelySubtagsScriptRegionV1

impl DynamicDataMarker for LocaleParentsV1

impl DynamicDataMarker for LocaleScriptDirectionV1

impl DynamicDataMarker for NormalizerNfcV1

impl DynamicDataMarker for NormalizerNfdDataV1

impl DynamicDataMarker for NormalizerNfdSupplementV1

impl DynamicDataMarker for NormalizerNfdTablesV1

impl DynamicDataMarker for NormalizerNfkdDataV1

impl DynamicDataMarker for NormalizerNfkdTablesV1

impl DynamicDataMarker for NormalizerUts46DataV1

impl DynamicDataMarker for PluralsCardinalV1

impl DynamicDataMarker for PluralsOrdinalV1

impl DynamicDataMarker for PluralsRangesV1

impl DynamicDataMarker for PropertyNameLongBidiClassV1

impl DynamicDataMarker for PropertyNameLongEastAsianWidthV1

impl DynamicDataMarker for PropertyNameLongGeneralCategoryV1

impl DynamicDataMarker for PropertyNameLongGraphemeClusterBreakV1

impl DynamicDataMarker for PropertyNameLongHangulSyllableTypeV1

impl DynamicDataMarker for PropertyNameLongIndicSyllabicCategoryV1

impl DynamicDataMarker for PropertyNameLongJoiningTypeV1

impl DynamicDataMarker for PropertyNameLongLineBreakV1

impl DynamicDataMarker for PropertyNameLongScriptV1

impl DynamicDataMarker for PropertyNameLongSentenceBreakV1

impl DynamicDataMarker for PropertyNameLongWordBreakV1

impl DynamicDataMarker for PropertyNameParseBidiClassV1

impl DynamicDataMarker for PropertyNameParseEastAsianWidthV1

impl DynamicDataMarker for PropertyNameParseGeneralCategoryMaskV1

impl DynamicDataMarker for PropertyNameParseGeneralCategoryV1

impl DynamicDataMarker for PropertyNameParseGraphemeClusterBreakV1

impl DynamicDataMarker for PropertyNameParseHangulSyllableTypeV1

impl DynamicDataMarker for PropertyNameParseIndicSyllabicCategoryV1

impl DynamicDataMarker for PropertyNameParseJoiningTypeV1

impl DynamicDataMarker for PropertyNameParseLineBreakV1

impl DynamicDataMarker for PropertyNameParseScriptV1

impl DynamicDataMarker for PropertyNameParseSentenceBreakV1

impl DynamicDataMarker for PropertyNameParseWordBreakV1

impl DynamicDataMarker for PropertyNameShortBidiClassV1

impl DynamicDataMarker for PropertyNameShortEastAsianWidthV1

impl DynamicDataMarker for PropertyNameShortGeneralCategoryV1

impl DynamicDataMarker for PropertyNameShortGraphemeClusterBreakV1

impl DynamicDataMarker for PropertyNameShortHangulSyllableTypeV1

impl DynamicDataMarker for PropertyNameShortIndicSyllabicCategoryV1

impl DynamicDataMarker for PropertyNameShortJoiningTypeV1

impl DynamicDataMarker for PropertyNameShortLineBreakV1

impl DynamicDataMarker for PropertyNameShortScriptV1

impl DynamicDataMarker for PropertyNameShortSentenceBreakV1

impl DynamicDataMarker for PropertyNameShortWordBreakV1

impl DynamicDataMarker for PropertyBinaryAlnumV1

impl DynamicDataMarker for PropertyBinaryAlphabeticV1

impl DynamicDataMarker for PropertyBinaryAsciiHexDigitV1

impl DynamicDataMarker for PropertyBinaryBasicEmojiV1

impl DynamicDataMarker for PropertyBinaryBidiControlV1

impl DynamicDataMarker for PropertyBinaryBidiMirroredV1

impl DynamicDataMarker for PropertyBinaryBlankV1

impl DynamicDataMarker for PropertyBinaryCaseIgnorableV1

impl DynamicDataMarker for PropertyBinaryCaseSensitiveV1

impl DynamicDataMarker for PropertyBinaryCasedV1

impl DynamicDataMarker for PropertyBinaryChangesWhenCasefoldedV1

impl DynamicDataMarker for PropertyBinaryChangesWhenCasemappedV1

impl DynamicDataMarker for PropertyBinaryChangesWhenLowercasedV1

impl DynamicDataMarker for PropertyBinaryChangesWhenTitlecasedV1

impl DynamicDataMarker for PropertyBinaryChangesWhenUppercasedV1

impl DynamicDataMarker for PropertyBinaryDashV1

impl DynamicDataMarker for PropertyBinaryDeprecatedV1

impl DynamicDataMarker for PropertyBinaryDiacriticV1

impl DynamicDataMarker for PropertyBinaryEmojiComponentV1

impl DynamicDataMarker for PropertyBinaryEmojiModifierBaseV1

impl DynamicDataMarker for PropertyBinaryEmojiModifierV1

impl DynamicDataMarker for PropertyBinaryEmojiPresentationV1

impl DynamicDataMarker for PropertyBinaryEmojiV1

impl DynamicDataMarker for PropertyBinaryExtendedPictographicV1

impl DynamicDataMarker for PropertyBinaryExtenderV1

impl DynamicDataMarker for PropertyBinaryFullCompositionExclusionV1

impl DynamicDataMarker for PropertyBinaryGraphV1

impl DynamicDataMarker for PropertyBinaryGraphemeBaseV1

impl DynamicDataMarker for PropertyBinaryGraphemeExtendV1

impl DynamicDataMarker for PropertyBinaryGraphemeLinkV1

impl DynamicDataMarker for PropertyBinaryHexDigitV1

impl DynamicDataMarker for PropertyBinaryHyphenV1

impl DynamicDataMarker for PropertyBinaryIdContinueV1

impl DynamicDataMarker for PropertyBinaryIdStartV1

impl DynamicDataMarker for PropertyBinaryIdeographicV1

impl DynamicDataMarker for PropertyBinaryIdsBinaryOperatorV1

impl DynamicDataMarker for PropertyBinaryIdsTrinaryOperatorV1

impl DynamicDataMarker for PropertyBinaryJoinControlV1

impl DynamicDataMarker for PropertyBinaryLogicalOrderExceptionV1

impl DynamicDataMarker for PropertyBinaryLowercaseV1

impl DynamicDataMarker for PropertyBinaryMathV1

impl DynamicDataMarker for PropertyBinaryNfcInertV1

impl DynamicDataMarker for PropertyBinaryNfdInertV1

impl DynamicDataMarker for PropertyBinaryNfkcInertV1

impl DynamicDataMarker for PropertyBinaryNfkdInertV1

impl DynamicDataMarker for PropertyBinaryNoncharacterCodePointV1

impl DynamicDataMarker for PropertyBinaryPatternSyntaxV1

impl DynamicDataMarker for PropertyBinaryPatternWhiteSpaceV1

impl DynamicDataMarker for PropertyBinaryPrintV1

impl DynamicDataMarker for PropertyBinaryQuotationMarkV1

impl DynamicDataMarker for PropertyBinaryRadicalV1

impl DynamicDataMarker for PropertyBinaryRegionalIndicatorV1

impl DynamicDataMarker for PropertyBinarySegmentStarterV1

impl DynamicDataMarker for PropertyBinarySentenceTerminalV1

impl DynamicDataMarker for PropertyBinarySoftDottedV1

impl DynamicDataMarker for PropertyBinaryTerminalPunctuationV1

impl DynamicDataMarker for PropertyBinaryUnifiedIdeographV1

impl DynamicDataMarker for PropertyBinaryUppercaseV1

impl DynamicDataMarker for PropertyBinaryVariationSelectorV1

impl DynamicDataMarker for PropertyBinaryWhiteSpaceV1

impl DynamicDataMarker for PropertyBinaryXdigitV1

impl DynamicDataMarker for PropertyBinaryXidContinueV1

impl DynamicDataMarker for PropertyBinaryXidStartV1

impl DynamicDataMarker for PropertyEnumBidiClassV1

impl DynamicDataMarker for PropertyEnumBidiMirroringGlyphV1

impl DynamicDataMarker for PropertyEnumCanonicalCombiningClassV1

impl DynamicDataMarker for PropertyEnumEastAsianWidthV1

impl DynamicDataMarker for PropertyEnumGeneralCategoryV1

impl DynamicDataMarker for PropertyEnumGraphemeClusterBreakV1

impl DynamicDataMarker for PropertyEnumHangulSyllableTypeV1

impl DynamicDataMarker for PropertyEnumIndicSyllabicCategoryV1

impl DynamicDataMarker for PropertyEnumJoiningTypeV1

impl DynamicDataMarker for PropertyEnumLineBreakV1

impl DynamicDataMarker for PropertyEnumScriptV1

impl DynamicDataMarker for PropertyEnumSentenceBreakV1

impl DynamicDataMarker for PropertyEnumWordBreakV1

impl DynamicDataMarker for PropertyScriptWithExtensionsV1

impl DynamicDataMarker for SegmenterBreakGraphemeClusterV1

impl DynamicDataMarker for SegmenterBreakLineV1

impl DynamicDataMarker for SegmenterBreakSentenceOverrideV1

impl DynamicDataMarker for SegmenterBreakSentenceV1

impl DynamicDataMarker for SegmenterBreakWordOverrideV1

impl DynamicDataMarker for SegmenterBreakWordV1

impl DynamicDataMarker for SegmenterDictionaryAutoV1

impl DynamicDataMarker for SegmenterDictionaryExtendedV1

impl DynamicDataMarker for SegmenterLstmAutoV1

impl DynamicDataMarker for TimeZoneIanaMapV1

impl DynamicDataMarker for TimeZoneIanaNamesV1

impl DynamicDataMarker for TimeZoneOffsetsV1

impl DynamicDataMarker for TimeZoneWindowsV1