Trait icu::datetime::scaffold::DateTimeNamesFrom
source · pub trait DateTimeNamesFrom<M>: DateTimeNamesMarkerwhere
M: DateTimeNamesMarker,{
// Required methods
fn map_year_names(
other: <<M as DateTimeNamesMarker>::YearNames as NamesContainer<YearNamesV1Marker, FieldLength>>::Container,
) -> <Self::YearNames as NamesContainer<YearNamesV1Marker, FieldLength>>::Container;
fn map_month_names(
other: <<M as DateTimeNamesMarker>::MonthNames as NamesContainer<MonthNamesV1Marker, (Month, FieldLength)>>::Container,
) -> <Self::MonthNames as NamesContainer<MonthNamesV1Marker, (Month, FieldLength)>>::Container;
fn map_weekday_names(
other: <<M as DateTimeNamesMarker>::WeekdayNames as NamesContainer<WeekdayNamesV1Marker, (Weekday, FieldLength)>>::Container,
) -> <Self::WeekdayNames as NamesContainer<WeekdayNamesV1Marker, (Weekday, FieldLength)>>::Container;
fn map_day_period_names(
other: <<M as DateTimeNamesMarker>::DayPeriodNames as NamesContainer<DayPeriodNamesV1Marker, FieldLength>>::Container,
) -> <Self::DayPeriodNames as NamesContainer<DayPeriodNamesV1Marker, FieldLength>>::Container;
fn map_zone_essentials(
other: <<M as DateTimeNamesMarker>::ZoneEssentials as NamesContainer<TimeZoneEssentialsV1Marker, ()>>::Container,
) -> <Self::ZoneEssentials as NamesContainer<TimeZoneEssentialsV1Marker, ()>>::Container;
fn map_zone_locations(
other: <<M as DateTimeNamesMarker>::ZoneLocations as NamesContainer<LocationsV1Marker, ()>>::Container,
) -> <Self::ZoneLocations as NamesContainer<LocationsV1Marker, ()>>::Container;
fn map_zone_generic_long(
other: <<M as DateTimeNamesMarker>::ZoneGenericLong as NamesContainer<MetazoneGenericNamesLongV1Marker, ()>>::Container,
) -> <Self::ZoneGenericLong as NamesContainer<MetazoneGenericNamesLongV1Marker, ()>>::Container;
fn map_zone_generic_short(
other: <<M as DateTimeNamesMarker>::ZoneGenericShort as NamesContainer<MetazoneGenericNamesShortV1Marker, ()>>::Container,
) -> <Self::ZoneGenericShort as NamesContainer<MetazoneGenericNamesShortV1Marker, ()>>::Container;
fn map_zone_specific_long(
other: <<M as DateTimeNamesMarker>::ZoneSpecificLong as NamesContainer<MetazoneSpecificNamesLongV1Marker, ()>>::Container,
) -> <Self::ZoneSpecificLong as NamesContainer<MetazoneSpecificNamesLongV1Marker, ()>>::Container;
fn map_zone_specific_short(
other: <<M as DateTimeNamesMarker>::ZoneSpecificShort as NamesContainer<MetazoneSpecificNamesShortV1Marker, ()>>::Container,
) -> <Self::ZoneSpecificShort as NamesContainer<MetazoneSpecificNamesShortV1Marker, ()>>::Container;
fn map_metazone_lookup(
other: <<M as DateTimeNamesMarker>::MetazoneLookup as NamesContainer<MetazonePeriodV1Marker, ()>>::Container,
) -> <Self::MetazoneLookup as NamesContainer<MetazonePeriodV1Marker, ()>>::Container;
}
Expand description
A trait for a DateTimeNamesMarker
that can be created from a more specific one, M
.
This trait is blanket-implemented on all field sets that are more general than M
.
§Examples
Example pairs of field sets where the trait is implemented:
use icu::datetime::fieldsets::T;
use icu::datetime::fieldsets::YMD;
use icu::datetime::fieldsets::enums::DateFieldSet;
use icu::datetime::fieldsets::enums::TimeFieldSet;
use icu::datetime::fieldsets::enums::CompositeDateTimeFieldSet;
use icu::datetime::fieldsets::enums::CompositeFieldSet;
use icu::datetime::scaffold::DateTimeNamesFrom;
use icu::datetime::scaffold::DateTimeNamesMarker;
fn is_trait_implemented<Source, Target>()
where
Source: DateTimeNamesMarker,
Target: DateTimeNamesFrom<Source>
{}
is_trait_implemented::<YMD, DateFieldSet>();
is_trait_implemented::<YMD, CompositeDateTimeFieldSet>();
is_trait_implemented::<YMD, CompositeFieldSet>();
is_trait_implemented::<T, TimeFieldSet>();
is_trait_implemented::<T, CompositeDateTimeFieldSet>();
is_trait_implemented::<T, CompositeFieldSet>();
is_trait_implemented::<DateFieldSet, CompositeDateTimeFieldSet>();
is_trait_implemented::<DateFieldSet, CompositeFieldSet>();
is_trait_implemented::<TimeFieldSet, CompositeDateTimeFieldSet>();
is_trait_implemented::<TimeFieldSet, CompositeFieldSet>();
Required Methods§
fn map_year_names( other: <<M as DateTimeNamesMarker>::YearNames as NamesContainer<YearNamesV1Marker, FieldLength>>::Container, ) -> <Self::YearNames as NamesContainer<YearNamesV1Marker, FieldLength>>::Container
fn map_month_names( other: <<M as DateTimeNamesMarker>::MonthNames as NamesContainer<MonthNamesV1Marker, (Month, FieldLength)>>::Container, ) -> <Self::MonthNames as NamesContainer<MonthNamesV1Marker, (Month, FieldLength)>>::Container
fn map_weekday_names( other: <<M as DateTimeNamesMarker>::WeekdayNames as NamesContainer<WeekdayNamesV1Marker, (Weekday, FieldLength)>>::Container, ) -> <Self::WeekdayNames as NamesContainer<WeekdayNamesV1Marker, (Weekday, FieldLength)>>::Container
fn map_day_period_names( other: <<M as DateTimeNamesMarker>::DayPeriodNames as NamesContainer<DayPeriodNamesV1Marker, FieldLength>>::Container, ) -> <Self::DayPeriodNames as NamesContainer<DayPeriodNamesV1Marker, FieldLength>>::Container
fn map_zone_essentials( other: <<M as DateTimeNamesMarker>::ZoneEssentials as NamesContainer<TimeZoneEssentialsV1Marker, ()>>::Container, ) -> <Self::ZoneEssentials as NamesContainer<TimeZoneEssentialsV1Marker, ()>>::Container
fn map_zone_locations( other: <<M as DateTimeNamesMarker>::ZoneLocations as NamesContainer<LocationsV1Marker, ()>>::Container, ) -> <Self::ZoneLocations as NamesContainer<LocationsV1Marker, ()>>::Container
fn map_zone_generic_long( other: <<M as DateTimeNamesMarker>::ZoneGenericLong as NamesContainer<MetazoneGenericNamesLongV1Marker, ()>>::Container, ) -> <Self::ZoneGenericLong as NamesContainer<MetazoneGenericNamesLongV1Marker, ()>>::Container
fn map_zone_generic_short( other: <<M as DateTimeNamesMarker>::ZoneGenericShort as NamesContainer<MetazoneGenericNamesShortV1Marker, ()>>::Container, ) -> <Self::ZoneGenericShort as NamesContainer<MetazoneGenericNamesShortV1Marker, ()>>::Container
fn map_zone_specific_long( other: <<M as DateTimeNamesMarker>::ZoneSpecificLong as NamesContainer<MetazoneSpecificNamesLongV1Marker, ()>>::Container, ) -> <Self::ZoneSpecificLong as NamesContainer<MetazoneSpecificNamesLongV1Marker, ()>>::Container
fn map_zone_specific_short( other: <<M as DateTimeNamesMarker>::ZoneSpecificShort as NamesContainer<MetazoneSpecificNamesShortV1Marker, ()>>::Container, ) -> <Self::ZoneSpecificShort as NamesContainer<MetazoneSpecificNamesShortV1Marker, ()>>::Container
fn map_metazone_lookup( other: <<M as DateTimeNamesMarker>::MetazoneLookup as NamesContainer<MetazonePeriodV1Marker, ()>>::Container, ) -> <Self::MetazoneLookup as NamesContainer<MetazonePeriodV1Marker, ()>>::Container
Object Safety§
This trait is not object safe.