Struct icu_datetime::neo::NeoFormatter

source ·
pub struct NeoFormatter<FSet: DateTimeNamesMarker> { /* private fields */ }
Expand description

NeoFormatter is a formatter capable of formatting dates and/or times from a calendar selected at runtime.

For more details, please read the crate root docs.

📏 This item has a stack size of 552 bytes on the stable toolchain at release date.

Implementations§

source§

impl<FSet> NeoFormatter<FSet>

source

pub fn try_new(locale: &DataLocale, field_set: FSet) -> Result<Self, LoadError>
where Baked: Sized + DataProvider<<<FSet::D as DateDataMarkers>::Year as CalMarkers<YearNamesV1Marker>>::Buddhist> + DataProvider<<<FSet::D as DateDataMarkers>::Year as CalMarkers<YearNamesV1Marker>>::Chinese> + DataProvider<<<FSet::D as DateDataMarkers>::Year as CalMarkers<YearNamesV1Marker>>::Coptic> + DataProvider<<<FSet::D as DateDataMarkers>::Year as CalMarkers<YearNamesV1Marker>>::Dangi> + DataProvider<<<FSet::D as DateDataMarkers>::Year as CalMarkers<YearNamesV1Marker>>::Ethiopian> + DataProvider<<<FSet::D as DateDataMarkers>::Year as CalMarkers<YearNamesV1Marker>>::EthiopianAmeteAlem> + DataProvider<<<FSet::D as DateDataMarkers>::Year as CalMarkers<YearNamesV1Marker>>::Gregorian> + DataProvider<<<FSet::D as DateDataMarkers>::Year as CalMarkers<YearNamesV1Marker>>::Hebrew> + DataProvider<<<FSet::D as DateDataMarkers>::Year as CalMarkers<YearNamesV1Marker>>::Indian> + DataProvider<<<FSet::D as DateDataMarkers>::Year as CalMarkers<YearNamesV1Marker>>::IslamicCivil> + DataProvider<<<FSet::D as DateDataMarkers>::Year as CalMarkers<YearNamesV1Marker>>::IslamicObservational> + DataProvider<<<FSet::D as DateDataMarkers>::Year as CalMarkers<YearNamesV1Marker>>::IslamicTabular> + DataProvider<<<FSet::D as DateDataMarkers>::Year as CalMarkers<YearNamesV1Marker>>::IslamicUmmAlQura> + DataProvider<<<FSet::D as DateDataMarkers>::Year as CalMarkers<YearNamesV1Marker>>::Japanese> + DataProvider<<<FSet::D as DateDataMarkers>::Year as CalMarkers<YearNamesV1Marker>>::JapaneseExtended> + DataProvider<<<FSet::D as DateDataMarkers>::Year as CalMarkers<YearNamesV1Marker>>::Persian> + DataProvider<<<FSet::D as DateDataMarkers>::Year as CalMarkers<YearNamesV1Marker>>::Roc> + DataProvider<<<FSet::D as DateDataMarkers>::Month as CalMarkers<MonthNamesV1Marker>>::Buddhist> + DataProvider<<<FSet::D as DateDataMarkers>::Month as CalMarkers<MonthNamesV1Marker>>::Chinese> + DataProvider<<<FSet::D as DateDataMarkers>::Month as CalMarkers<MonthNamesV1Marker>>::Coptic> + DataProvider<<<FSet::D as DateDataMarkers>::Month as CalMarkers<MonthNamesV1Marker>>::Dangi> + DataProvider<<<FSet::D as DateDataMarkers>::Month as CalMarkers<MonthNamesV1Marker>>::Ethiopian> + DataProvider<<<FSet::D as DateDataMarkers>::Month as CalMarkers<MonthNamesV1Marker>>::EthiopianAmeteAlem> + DataProvider<<<FSet::D as DateDataMarkers>::Month as CalMarkers<MonthNamesV1Marker>>::Gregorian> + DataProvider<<<FSet::D as DateDataMarkers>::Month as CalMarkers<MonthNamesV1Marker>>::Hebrew> + DataProvider<<<FSet::D as DateDataMarkers>::Month as CalMarkers<MonthNamesV1Marker>>::Indian> + DataProvider<<<FSet::D as DateDataMarkers>::Month as CalMarkers<MonthNamesV1Marker>>::IslamicCivil> + DataProvider<<<FSet::D as DateDataMarkers>::Month as CalMarkers<MonthNamesV1Marker>>::IslamicObservational> + DataProvider<<<FSet::D as DateDataMarkers>::Month as CalMarkers<MonthNamesV1Marker>>::IslamicTabular> + DataProvider<<<FSet::D as DateDataMarkers>::Month as CalMarkers<MonthNamesV1Marker>>::IslamicUmmAlQura> + DataProvider<<<FSet::D as DateDataMarkers>::Month as CalMarkers<MonthNamesV1Marker>>::Japanese> + DataProvider<<<FSet::D as DateDataMarkers>::Month as CalMarkers<MonthNamesV1Marker>>::JapaneseExtended> + DataProvider<<<FSet::D as DateDataMarkers>::Month as CalMarkers<MonthNamesV1Marker>>::Persian> + DataProvider<<<FSet::D as DateDataMarkers>::Month as CalMarkers<MonthNamesV1Marker>>::Roc> + DataProvider<<<FSet::D as DateDataMarkers>::Skel as CalMarkers<ErasedMarker<PackedPatternsV1<'static>>>>::Buddhist> + DataProvider<<<FSet::D as DateDataMarkers>::Skel as CalMarkers<ErasedMarker<PackedPatternsV1<'static>>>>::Chinese> + DataProvider<<<FSet::D as DateDataMarkers>::Skel as CalMarkers<ErasedMarker<PackedPatternsV1<'static>>>>::Coptic> + DataProvider<<<FSet::D as DateDataMarkers>::Skel as CalMarkers<ErasedMarker<PackedPatternsV1<'static>>>>::Dangi> + DataProvider<<<FSet::D as DateDataMarkers>::Skel as CalMarkers<ErasedMarker<PackedPatternsV1<'static>>>>::Ethiopian> + DataProvider<<<FSet::D as DateDataMarkers>::Skel as CalMarkers<ErasedMarker<PackedPatternsV1<'static>>>>::EthiopianAmeteAlem> + DataProvider<<<FSet::D as DateDataMarkers>::Skel as CalMarkers<ErasedMarker<PackedPatternsV1<'static>>>>::Gregorian> + DataProvider<<<FSet::D as DateDataMarkers>::Skel as CalMarkers<ErasedMarker<PackedPatternsV1<'static>>>>::Hebrew> + DataProvider<<<FSet::D as DateDataMarkers>::Skel as CalMarkers<ErasedMarker<PackedPatternsV1<'static>>>>::Indian> + DataProvider<<<FSet::D as DateDataMarkers>::Skel as CalMarkers<ErasedMarker<PackedPatternsV1<'static>>>>::IslamicCivil> + DataProvider<<<FSet::D as DateDataMarkers>::Skel as CalMarkers<ErasedMarker<PackedPatternsV1<'static>>>>::IslamicObservational> + DataProvider<<<FSet::D as DateDataMarkers>::Skel as CalMarkers<ErasedMarker<PackedPatternsV1<'static>>>>::IslamicTabular> + DataProvider<<<FSet::D as DateDataMarkers>::Skel as CalMarkers<ErasedMarker<PackedPatternsV1<'static>>>>::IslamicUmmAlQura> + DataProvider<<<FSet::D as DateDataMarkers>::Skel as CalMarkers<ErasedMarker<PackedPatternsV1<'static>>>>::Japanese> + DataProvider<<<FSet::D as DateDataMarkers>::Skel as CalMarkers<ErasedMarker<PackedPatternsV1<'static>>>>::JapaneseExtended> + DataProvider<<<FSet::D as DateDataMarkers>::Skel as CalMarkers<ErasedMarker<PackedPatternsV1<'static>>>>::Persian> + DataProvider<<<FSet::D as DateDataMarkers>::Skel as CalMarkers<ErasedMarker<PackedPatternsV1<'static>>>>::Roc> + DataProvider<<FSet::D as DateDataMarkers>::WeekdayNamesV1Marker> + DataProvider<<FSet::T as TimeMarkers>::DayPeriodNamesV1Marker> + DataProvider<<FSet::T as TimeMarkers>::TimeSkeletonPatternsV1Marker> + DataProvider<<FSet::Z as ZoneMarkers>::EssentialsV1Marker> + DataProvider<<FSet::Z as ZoneMarkers>::LocationsV1Marker> + DataProvider<<FSet::Z as ZoneMarkers>::GenericLongV1Marker> + DataProvider<<FSet::Z as ZoneMarkers>::GenericShortV1Marker> + DataProvider<<FSet::Z as ZoneMarkers>::SpecificLongV1Marker> + DataProvider<<FSet::Z as ZoneMarkers>::SpecificShortV1Marker> + DataProvider<<FSet::Z as ZoneMarkers>::MetazonePeriodV1Marker> + DataProvider<FSet::GluePatternV1Marker>,

Creates a new NeoFormatter from compiled data with datetime components specified at build time.

This method will pick the calendar off of the locale; and if unspecified or unknown will fall back to the default calendar for the locale. See AnyCalendarKind for a list of supported calendars.

Use this constructor for optimal data size and memory use if you know the required datetime components at build time. If you do not know the datetime components until runtime, use a with_components constructor.

Enabled with the compiled_data Cargo feature.

📚 Help choosing a constructor

§Examples

Basic usage:

use icu::calendar::{any_calendar::AnyCalendar, DateTime};
use icu::datetime::neo::NeoFormatter;
use icu::datetime::neo_marker::NeoYearMonthDayMarker;
use icu::datetime::neo_skeleton::NeoSkeletonLength;
use icu::locale::locale;
use std::str::FromStr;
use writeable::assert_try_writeable_eq;

let length = NeoSkeletonLength::Medium;
let locale = locale!("en-u-ca-hebrew");

let formatter = NeoFormatter::try_new(
    &locale.into(),
    NeoYearMonthDayMarker::with_length(length),
)
.unwrap();

let datetime = DateTime::try_new_iso(2024, 5, 8, 0, 0, 0).unwrap();

assert_try_writeable_eq!(
    formatter.convert_and_format(&datetime),
    "30 Nisan 5784"
);
source

pub fn try_new_with_any_provider<P>( provider: &P, locale: &DataLocale, options: FSet, ) -> Result<Self, LoadError>
where P: AnyProvider + ?Sized,

A version of [Self :: try_new] that uses custom data provided by an AnyProvider.

📚 Help choosing a constructor

source

pub fn try_new_with_buffer_provider<P>( provider: &P, locale: &DataLocale, options: FSet, ) -> Result<Self, LoadError>
where P: BufferProvider + ?Sized,

A version of [Self :: try_new] that uses custom data provided by a BufferProvider.

Enabled with the serde feature.

📚 Help choosing a constructor

source

pub fn try_new_unstable<P>( provider: &P, locale: &DataLocale, field_set: FSet, ) -> Result<Self, LoadError>
where P: ?Sized + DataProvider<<<FSet::D as DateDataMarkers>::Year as CalMarkers<YearNamesV1Marker>>::Buddhist> + DataProvider<<<FSet::D as DateDataMarkers>::Year as CalMarkers<YearNamesV1Marker>>::Chinese> + DataProvider<<<FSet::D as DateDataMarkers>::Year as CalMarkers<YearNamesV1Marker>>::Coptic> + DataProvider<<<FSet::D as DateDataMarkers>::Year as CalMarkers<YearNamesV1Marker>>::Dangi> + DataProvider<<<FSet::D as DateDataMarkers>::Year as CalMarkers<YearNamesV1Marker>>::Ethiopian> + DataProvider<<<FSet::D as DateDataMarkers>::Year as CalMarkers<YearNamesV1Marker>>::EthiopianAmeteAlem> + DataProvider<<<FSet::D as DateDataMarkers>::Year as CalMarkers<YearNamesV1Marker>>::Gregorian> + DataProvider<<<FSet::D as DateDataMarkers>::Year as CalMarkers<YearNamesV1Marker>>::Hebrew> + DataProvider<<<FSet::D as DateDataMarkers>::Year as CalMarkers<YearNamesV1Marker>>::Indian> + DataProvider<<<FSet::D as DateDataMarkers>::Year as CalMarkers<YearNamesV1Marker>>::IslamicCivil> + DataProvider<<<FSet::D as DateDataMarkers>::Year as CalMarkers<YearNamesV1Marker>>::IslamicObservational> + DataProvider<<<FSet::D as DateDataMarkers>::Year as CalMarkers<YearNamesV1Marker>>::IslamicTabular> + DataProvider<<<FSet::D as DateDataMarkers>::Year as CalMarkers<YearNamesV1Marker>>::IslamicUmmAlQura> + DataProvider<<<FSet::D as DateDataMarkers>::Year as CalMarkers<YearNamesV1Marker>>::Japanese> + DataProvider<<<FSet::D as DateDataMarkers>::Year as CalMarkers<YearNamesV1Marker>>::JapaneseExtended> + DataProvider<<<FSet::D as DateDataMarkers>::Year as CalMarkers<YearNamesV1Marker>>::Persian> + DataProvider<<<FSet::D as DateDataMarkers>::Year as CalMarkers<YearNamesV1Marker>>::Roc> + DataProvider<<<FSet::D as DateDataMarkers>::Month as CalMarkers<MonthNamesV1Marker>>::Buddhist> + DataProvider<<<FSet::D as DateDataMarkers>::Month as CalMarkers<MonthNamesV1Marker>>::Chinese> + DataProvider<<<FSet::D as DateDataMarkers>::Month as CalMarkers<MonthNamesV1Marker>>::Coptic> + DataProvider<<<FSet::D as DateDataMarkers>::Month as CalMarkers<MonthNamesV1Marker>>::Dangi> + DataProvider<<<FSet::D as DateDataMarkers>::Month as CalMarkers<MonthNamesV1Marker>>::Ethiopian> + DataProvider<<<FSet::D as DateDataMarkers>::Month as CalMarkers<MonthNamesV1Marker>>::EthiopianAmeteAlem> + DataProvider<<<FSet::D as DateDataMarkers>::Month as CalMarkers<MonthNamesV1Marker>>::Gregorian> + DataProvider<<<FSet::D as DateDataMarkers>::Month as CalMarkers<MonthNamesV1Marker>>::Hebrew> + DataProvider<<<FSet::D as DateDataMarkers>::Month as CalMarkers<MonthNamesV1Marker>>::Indian> + DataProvider<<<FSet::D as DateDataMarkers>::Month as CalMarkers<MonthNamesV1Marker>>::IslamicCivil> + DataProvider<<<FSet::D as DateDataMarkers>::Month as CalMarkers<MonthNamesV1Marker>>::IslamicObservational> + DataProvider<<<FSet::D as DateDataMarkers>::Month as CalMarkers<MonthNamesV1Marker>>::IslamicTabular> + DataProvider<<<FSet::D as DateDataMarkers>::Month as CalMarkers<MonthNamesV1Marker>>::IslamicUmmAlQura> + DataProvider<<<FSet::D as DateDataMarkers>::Month as CalMarkers<MonthNamesV1Marker>>::Japanese> + DataProvider<<<FSet::D as DateDataMarkers>::Month as CalMarkers<MonthNamesV1Marker>>::JapaneseExtended> + DataProvider<<<FSet::D as DateDataMarkers>::Month as CalMarkers<MonthNamesV1Marker>>::Persian> + DataProvider<<<FSet::D as DateDataMarkers>::Month as CalMarkers<MonthNamesV1Marker>>::Roc> + DataProvider<<<FSet::D as DateDataMarkers>::Skel as CalMarkers<ErasedMarker<PackedPatternsV1<'static>>>>::Buddhist> + DataProvider<<<FSet::D as DateDataMarkers>::Skel as CalMarkers<ErasedMarker<PackedPatternsV1<'static>>>>::Chinese> + DataProvider<<<FSet::D as DateDataMarkers>::Skel as CalMarkers<ErasedMarker<PackedPatternsV1<'static>>>>::Coptic> + DataProvider<<<FSet::D as DateDataMarkers>::Skel as CalMarkers<ErasedMarker<PackedPatternsV1<'static>>>>::Dangi> + DataProvider<<<FSet::D as DateDataMarkers>::Skel as CalMarkers<ErasedMarker<PackedPatternsV1<'static>>>>::Ethiopian> + DataProvider<<<FSet::D as DateDataMarkers>::Skel as CalMarkers<ErasedMarker<PackedPatternsV1<'static>>>>::EthiopianAmeteAlem> + DataProvider<<<FSet::D as DateDataMarkers>::Skel as CalMarkers<ErasedMarker<PackedPatternsV1<'static>>>>::Gregorian> + DataProvider<<<FSet::D as DateDataMarkers>::Skel as CalMarkers<ErasedMarker<PackedPatternsV1<'static>>>>::Hebrew> + DataProvider<<<FSet::D as DateDataMarkers>::Skel as CalMarkers<ErasedMarker<PackedPatternsV1<'static>>>>::Indian> + DataProvider<<<FSet::D as DateDataMarkers>::Skel as CalMarkers<ErasedMarker<PackedPatternsV1<'static>>>>::IslamicCivil> + DataProvider<<<FSet::D as DateDataMarkers>::Skel as CalMarkers<ErasedMarker<PackedPatternsV1<'static>>>>::IslamicObservational> + DataProvider<<<FSet::D as DateDataMarkers>::Skel as CalMarkers<ErasedMarker<PackedPatternsV1<'static>>>>::IslamicTabular> + DataProvider<<<FSet::D as DateDataMarkers>::Skel as CalMarkers<ErasedMarker<PackedPatternsV1<'static>>>>::IslamicUmmAlQura> + DataProvider<<<FSet::D as DateDataMarkers>::Skel as CalMarkers<ErasedMarker<PackedPatternsV1<'static>>>>::Japanese> + DataProvider<<<FSet::D as DateDataMarkers>::Skel as CalMarkers<ErasedMarker<PackedPatternsV1<'static>>>>::JapaneseExtended> + DataProvider<<<FSet::D as DateDataMarkers>::Skel as CalMarkers<ErasedMarker<PackedPatternsV1<'static>>>>::Persian> + DataProvider<<<FSet::D as DateDataMarkers>::Skel as CalMarkers<ErasedMarker<PackedPatternsV1<'static>>>>::Roc> + DataProvider<<FSet::D as DateDataMarkers>::WeekdayNamesV1Marker> + DataProvider<<FSet::T as TimeMarkers>::DayPeriodNamesV1Marker> + DataProvider<<FSet::T as TimeMarkers>::TimeSkeletonPatternsV1Marker> + DataProvider<<FSet::Z as ZoneMarkers>::EssentialsV1Marker> + DataProvider<<FSet::Z as ZoneMarkers>::LocationsV1Marker> + DataProvider<<FSet::Z as ZoneMarkers>::GenericLongV1Marker> + DataProvider<<FSet::Z as ZoneMarkers>::GenericShortV1Marker> + DataProvider<<FSet::Z as ZoneMarkers>::SpecificLongV1Marker> + DataProvider<<FSet::Z as ZoneMarkers>::SpecificShortV1Marker> + DataProvider<<FSet::Z as ZoneMarkers>::MetazonePeriodV1Marker> + DataProvider<FSet::GluePatternV1Marker> + DataProvider<ChineseCacheV1Marker> + DataProvider<DangiCacheV1Marker> + DataProvider<IslamicObservationalCacheV1Marker> + DataProvider<IslamicUmmAlQuraCacheV1Marker> + DataProvider<JapaneseErasV1Marker> + DataProvider<JapaneseExtendedErasV1Marker> + DataProvider<DecimalSymbolsV1Marker>,

A version of Self::try_new that uses custom data provided by a DataProvider.

📚 Help choosing a constructor

⚠️ The bounds on provider may change over time, including in SemVer minor releases.
source§

impl<FSet> NeoFormatter<FSet>

source

pub fn try_new_with_skeleton( locale: &DataLocale, skeleton: FSet, ) -> Result<Self, LoadError>
where Baked: Sized + DataProvider<<<FSet::D as DateDataMarkers>::Year as CalMarkers<YearNamesV1Marker>>::Buddhist> + DataProvider<<<FSet::D as DateDataMarkers>::Year as CalMarkers<YearNamesV1Marker>>::Chinese> + DataProvider<<<FSet::D as DateDataMarkers>::Year as CalMarkers<YearNamesV1Marker>>::Coptic> + DataProvider<<<FSet::D as DateDataMarkers>::Year as CalMarkers<YearNamesV1Marker>>::Dangi> + DataProvider<<<FSet::D as DateDataMarkers>::Year as CalMarkers<YearNamesV1Marker>>::Ethiopian> + DataProvider<<<FSet::D as DateDataMarkers>::Year as CalMarkers<YearNamesV1Marker>>::EthiopianAmeteAlem> + DataProvider<<<FSet::D as DateDataMarkers>::Year as CalMarkers<YearNamesV1Marker>>::Gregorian> + DataProvider<<<FSet::D as DateDataMarkers>::Year as CalMarkers<YearNamesV1Marker>>::Hebrew> + DataProvider<<<FSet::D as DateDataMarkers>::Year as CalMarkers<YearNamesV1Marker>>::Indian> + DataProvider<<<FSet::D as DateDataMarkers>::Year as CalMarkers<YearNamesV1Marker>>::IslamicCivil> + DataProvider<<<FSet::D as DateDataMarkers>::Year as CalMarkers<YearNamesV1Marker>>::IslamicObservational> + DataProvider<<<FSet::D as DateDataMarkers>::Year as CalMarkers<YearNamesV1Marker>>::IslamicTabular> + DataProvider<<<FSet::D as DateDataMarkers>::Year as CalMarkers<YearNamesV1Marker>>::IslamicUmmAlQura> + DataProvider<<<FSet::D as DateDataMarkers>::Year as CalMarkers<YearNamesV1Marker>>::Japanese> + DataProvider<<<FSet::D as DateDataMarkers>::Year as CalMarkers<YearNamesV1Marker>>::JapaneseExtended> + DataProvider<<<FSet::D as DateDataMarkers>::Year as CalMarkers<YearNamesV1Marker>>::Persian> + DataProvider<<<FSet::D as DateDataMarkers>::Year as CalMarkers<YearNamesV1Marker>>::Roc> + DataProvider<<<FSet::D as DateDataMarkers>::Month as CalMarkers<MonthNamesV1Marker>>::Buddhist> + DataProvider<<<FSet::D as DateDataMarkers>::Month as CalMarkers<MonthNamesV1Marker>>::Chinese> + DataProvider<<<FSet::D as DateDataMarkers>::Month as CalMarkers<MonthNamesV1Marker>>::Coptic> + DataProvider<<<FSet::D as DateDataMarkers>::Month as CalMarkers<MonthNamesV1Marker>>::Dangi> + DataProvider<<<FSet::D as DateDataMarkers>::Month as CalMarkers<MonthNamesV1Marker>>::Ethiopian> + DataProvider<<<FSet::D as DateDataMarkers>::Month as CalMarkers<MonthNamesV1Marker>>::EthiopianAmeteAlem> + DataProvider<<<FSet::D as DateDataMarkers>::Month as CalMarkers<MonthNamesV1Marker>>::Gregorian> + DataProvider<<<FSet::D as DateDataMarkers>::Month as CalMarkers<MonthNamesV1Marker>>::Hebrew> + DataProvider<<<FSet::D as DateDataMarkers>::Month as CalMarkers<MonthNamesV1Marker>>::Indian> + DataProvider<<<FSet::D as DateDataMarkers>::Month as CalMarkers<MonthNamesV1Marker>>::IslamicCivil> + DataProvider<<<FSet::D as DateDataMarkers>::Month as CalMarkers<MonthNamesV1Marker>>::IslamicObservational> + DataProvider<<<FSet::D as DateDataMarkers>::Month as CalMarkers<MonthNamesV1Marker>>::IslamicTabular> + DataProvider<<<FSet::D as DateDataMarkers>::Month as CalMarkers<MonthNamesV1Marker>>::IslamicUmmAlQura> + DataProvider<<<FSet::D as DateDataMarkers>::Month as CalMarkers<MonthNamesV1Marker>>::Japanese> + DataProvider<<<FSet::D as DateDataMarkers>::Month as CalMarkers<MonthNamesV1Marker>>::JapaneseExtended> + DataProvider<<<FSet::D as DateDataMarkers>::Month as CalMarkers<MonthNamesV1Marker>>::Persian> + DataProvider<<<FSet::D as DateDataMarkers>::Month as CalMarkers<MonthNamesV1Marker>>::Roc> + DataProvider<<<FSet::D as DateDataMarkers>::Skel as CalMarkers<ErasedMarker<PackedPatternsV1<'static>>>>::Buddhist> + DataProvider<<<FSet::D as DateDataMarkers>::Skel as CalMarkers<ErasedMarker<PackedPatternsV1<'static>>>>::Chinese> + DataProvider<<<FSet::D as DateDataMarkers>::Skel as CalMarkers<ErasedMarker<PackedPatternsV1<'static>>>>::Coptic> + DataProvider<<<FSet::D as DateDataMarkers>::Skel as CalMarkers<ErasedMarker<PackedPatternsV1<'static>>>>::Dangi> + DataProvider<<<FSet::D as DateDataMarkers>::Skel as CalMarkers<ErasedMarker<PackedPatternsV1<'static>>>>::Ethiopian> + DataProvider<<<FSet::D as DateDataMarkers>::Skel as CalMarkers<ErasedMarker<PackedPatternsV1<'static>>>>::EthiopianAmeteAlem> + DataProvider<<<FSet::D as DateDataMarkers>::Skel as CalMarkers<ErasedMarker<PackedPatternsV1<'static>>>>::Gregorian> + DataProvider<<<FSet::D as DateDataMarkers>::Skel as CalMarkers<ErasedMarker<PackedPatternsV1<'static>>>>::Hebrew> + DataProvider<<<FSet::D as DateDataMarkers>::Skel as CalMarkers<ErasedMarker<PackedPatternsV1<'static>>>>::Indian> + DataProvider<<<FSet::D as DateDataMarkers>::Skel as CalMarkers<ErasedMarker<PackedPatternsV1<'static>>>>::IslamicCivil> + DataProvider<<<FSet::D as DateDataMarkers>::Skel as CalMarkers<ErasedMarker<PackedPatternsV1<'static>>>>::IslamicObservational> + DataProvider<<<FSet::D as DateDataMarkers>::Skel as CalMarkers<ErasedMarker<PackedPatternsV1<'static>>>>::IslamicTabular> + DataProvider<<<FSet::D as DateDataMarkers>::Skel as CalMarkers<ErasedMarker<PackedPatternsV1<'static>>>>::IslamicUmmAlQura> + DataProvider<<<FSet::D as DateDataMarkers>::Skel as CalMarkers<ErasedMarker<PackedPatternsV1<'static>>>>::Japanese> + DataProvider<<<FSet::D as DateDataMarkers>::Skel as CalMarkers<ErasedMarker<PackedPatternsV1<'static>>>>::JapaneseExtended> + DataProvider<<<FSet::D as DateDataMarkers>::Skel as CalMarkers<ErasedMarker<PackedPatternsV1<'static>>>>::Persian> + DataProvider<<<FSet::D as DateDataMarkers>::Skel as CalMarkers<ErasedMarker<PackedPatternsV1<'static>>>>::Roc> + DataProvider<<FSet::D as DateDataMarkers>::WeekdayNamesV1Marker> + DataProvider<<FSet::T as TimeMarkers>::DayPeriodNamesV1Marker> + DataProvider<<FSet::T as TimeMarkers>::TimeSkeletonPatternsV1Marker> + DataProvider<<FSet::Z as ZoneMarkers>::EssentialsV1Marker> + DataProvider<<FSet::Z as ZoneMarkers>::LocationsV1Marker> + DataProvider<<FSet::Z as ZoneMarkers>::GenericLongV1Marker> + DataProvider<<FSet::Z as ZoneMarkers>::GenericShortV1Marker> + DataProvider<<FSet::Z as ZoneMarkers>::SpecificLongV1Marker> + DataProvider<<FSet::Z as ZoneMarkers>::SpecificShortV1Marker> + DataProvider<<FSet::Z as ZoneMarkers>::MetazonePeriodV1Marker> + DataProvider<FSet::GluePatternV1Marker>,

Creates a new NeoFormatter from compiled data with datetime components specified at runtime.

If you know the datetime components at build time, use NeoFormatter::try_new for smaller data size and memory use.

Enabled with the compiled_data Cargo feature.

📚 Help choosing a constructor

§Examples

Date components:

use icu::calendar::Date;
use icu::datetime::neo::NeoFormatter;
use icu::datetime::neo_skeleton::NeoDateComponents;
use icu::datetime::neo_skeleton::NeoDateSkeleton;
use icu::datetime::neo_skeleton::NeoSkeletonLength;
use icu::locale::locale;
use writeable::assert_try_writeable_eq;

let fmt = NeoFormatter::try_new_with_skeleton(
    &locale!("es-MX").into(),
    NeoDateSkeleton::for_length_and_components(
        NeoSkeletonLength::Medium,
        NeoDateComponents::DayWeekday,
    ),
)
.unwrap();
let dt = Date::try_new_iso(2024, 1, 10).unwrap();

assert_try_writeable_eq!(fmt.convert_and_format(&dt), "mié 10");

Calendar period components:

use icu::calendar::Date;
use icu::datetime::neo::NeoFormatter;
use icu::datetime::neo_skeleton::NeoCalendarPeriodComponents;
use icu::datetime::neo_skeleton::NeoCalendarPeriodSkeleton;
use icu::datetime::neo_skeleton::NeoSkeletonLength;
use icu::locale::locale;
use writeable::assert_try_writeable_eq;

let fmt = NeoFormatter::try_new_with_skeleton(
    &locale!("es-MX").into(),
    NeoCalendarPeriodSkeleton::for_length_and_components(
        NeoSkeletonLength::Medium,
        NeoCalendarPeriodComponents::YearMonth,
    ),
)
.unwrap();
let dt = Date::try_new_iso(2024, 1, 10).unwrap();

assert_try_writeable_eq!(fmt.convert_and_format(&dt), "ene 2024");

Time components:

use icu::calendar::Time;
use icu::datetime::neo::NeoFormatter;
use icu::datetime::neo_skeleton::NeoSkeletonLength;
use icu::datetime::neo_skeleton::NeoTimeComponents;
use icu::datetime::neo_skeleton::NeoTimeSkeleton;
use icu::locale::locale;
use writeable::assert_try_writeable_eq;

let fmt = NeoFormatter::try_new_with_skeleton(
    &locale!("es-MX").into(),
    NeoTimeSkeleton::for_length_and_components(
        NeoSkeletonLength::Medium,
        NeoTimeComponents::Hour,
    ),
)
.unwrap();
let dt = Time::try_new(16, 20, 0, 0).unwrap();

assert_try_writeable_eq!(fmt.convert_and_format(&dt), "04 p.m.");

Date and time components:

use icu::calendar::DateTime;
use icu::datetime::neo::NeoFormatter;
use icu::datetime::neo_skeleton::NeoDateComponents;
use icu::datetime::neo_skeleton::NeoDateTimeComponents;
use icu::datetime::neo_skeleton::NeoDateTimeSkeleton;
use icu::datetime::neo_skeleton::NeoSkeletonLength;
use icu::datetime::neo_skeleton::NeoTimeComponents;
use icu::locale::locale;
use writeable::assert_try_writeable_eq;

let fmt = NeoFormatter::try_new_with_skeleton(
    &locale!("es-MX").into(),
    NeoDateTimeSkeleton::for_length_and_components(
        NeoSkeletonLength::Long,
        NeoDateTimeComponents::DateTime(
            NeoDateComponents::Weekday,
            NeoTimeComponents::HourMinute,
        ),
    ),
)
.unwrap();
let dt = DateTime::try_new_iso(2024, 1, 10, 16, 20, 0).unwrap();

assert_try_writeable_eq!(
    fmt.convert_and_format(&dt),
    "miércoles 4:20 p.m."
);
source

pub fn try_new_with_skeleton_with_any_provider<P>( provider: &P, locale: &DataLocale, skeleton: FSet, ) -> Result<Self, LoadError>
where P: AnyProvider + ?Sized,

A version of [Self :: try_new_with_skeleton] that uses custom data provided by an AnyProvider.

📚 Help choosing a constructor

source

pub fn try_new_with_skeleton_with_buffer_provider<P>( provider: &P, locale: &DataLocale, skeleton: FSet, ) -> Result<Self, LoadError>
where P: BufferProvider + ?Sized,

A version of [Self :: try_new_with_skeleton] that uses custom data provided by a BufferProvider.

Enabled with the serde feature.

📚 Help choosing a constructor

source

pub fn try_new_with_skeleton_unstable<P>( provider: &P, locale: &DataLocale, skeleton: FSet, ) -> Result<Self, LoadError>
where P: ?Sized + DataProvider<<<FSet::D as DateDataMarkers>::Year as CalMarkers<YearNamesV1Marker>>::Buddhist> + DataProvider<<<FSet::D as DateDataMarkers>::Year as CalMarkers<YearNamesV1Marker>>::Chinese> + DataProvider<<<FSet::D as DateDataMarkers>::Year as CalMarkers<YearNamesV1Marker>>::Coptic> + DataProvider<<<FSet::D as DateDataMarkers>::Year as CalMarkers<YearNamesV1Marker>>::Dangi> + DataProvider<<<FSet::D as DateDataMarkers>::Year as CalMarkers<YearNamesV1Marker>>::Ethiopian> + DataProvider<<<FSet::D as DateDataMarkers>::Year as CalMarkers<YearNamesV1Marker>>::EthiopianAmeteAlem> + DataProvider<<<FSet::D as DateDataMarkers>::Year as CalMarkers<YearNamesV1Marker>>::Gregorian> + DataProvider<<<FSet::D as DateDataMarkers>::Year as CalMarkers<YearNamesV1Marker>>::Hebrew> + DataProvider<<<FSet::D as DateDataMarkers>::Year as CalMarkers<YearNamesV1Marker>>::Indian> + DataProvider<<<FSet::D as DateDataMarkers>::Year as CalMarkers<YearNamesV1Marker>>::IslamicCivil> + DataProvider<<<FSet::D as DateDataMarkers>::Year as CalMarkers<YearNamesV1Marker>>::IslamicObservational> + DataProvider<<<FSet::D as DateDataMarkers>::Year as CalMarkers<YearNamesV1Marker>>::IslamicTabular> + DataProvider<<<FSet::D as DateDataMarkers>::Year as CalMarkers<YearNamesV1Marker>>::IslamicUmmAlQura> + DataProvider<<<FSet::D as DateDataMarkers>::Year as CalMarkers<YearNamesV1Marker>>::Japanese> + DataProvider<<<FSet::D as DateDataMarkers>::Year as CalMarkers<YearNamesV1Marker>>::JapaneseExtended> + DataProvider<<<FSet::D as DateDataMarkers>::Year as CalMarkers<YearNamesV1Marker>>::Persian> + DataProvider<<<FSet::D as DateDataMarkers>::Year as CalMarkers<YearNamesV1Marker>>::Roc> + DataProvider<<<FSet::D as DateDataMarkers>::Month as CalMarkers<MonthNamesV1Marker>>::Buddhist> + DataProvider<<<FSet::D as DateDataMarkers>::Month as CalMarkers<MonthNamesV1Marker>>::Chinese> + DataProvider<<<FSet::D as DateDataMarkers>::Month as CalMarkers<MonthNamesV1Marker>>::Coptic> + DataProvider<<<FSet::D as DateDataMarkers>::Month as CalMarkers<MonthNamesV1Marker>>::Dangi> + DataProvider<<<FSet::D as DateDataMarkers>::Month as CalMarkers<MonthNamesV1Marker>>::Ethiopian> + DataProvider<<<FSet::D as DateDataMarkers>::Month as CalMarkers<MonthNamesV1Marker>>::EthiopianAmeteAlem> + DataProvider<<<FSet::D as DateDataMarkers>::Month as CalMarkers<MonthNamesV1Marker>>::Gregorian> + DataProvider<<<FSet::D as DateDataMarkers>::Month as CalMarkers<MonthNamesV1Marker>>::Hebrew> + DataProvider<<<FSet::D as DateDataMarkers>::Month as CalMarkers<MonthNamesV1Marker>>::Indian> + DataProvider<<<FSet::D as DateDataMarkers>::Month as CalMarkers<MonthNamesV1Marker>>::IslamicCivil> + DataProvider<<<FSet::D as DateDataMarkers>::Month as CalMarkers<MonthNamesV1Marker>>::IslamicObservational> + DataProvider<<<FSet::D as DateDataMarkers>::Month as CalMarkers<MonthNamesV1Marker>>::IslamicTabular> + DataProvider<<<FSet::D as DateDataMarkers>::Month as CalMarkers<MonthNamesV1Marker>>::IslamicUmmAlQura> + DataProvider<<<FSet::D as DateDataMarkers>::Month as CalMarkers<MonthNamesV1Marker>>::Japanese> + DataProvider<<<FSet::D as DateDataMarkers>::Month as CalMarkers<MonthNamesV1Marker>>::JapaneseExtended> + DataProvider<<<FSet::D as DateDataMarkers>::Month as CalMarkers<MonthNamesV1Marker>>::Persian> + DataProvider<<<FSet::D as DateDataMarkers>::Month as CalMarkers<MonthNamesV1Marker>>::Roc> + DataProvider<<<FSet::D as DateDataMarkers>::Skel as CalMarkers<ErasedMarker<PackedPatternsV1<'static>>>>::Buddhist> + DataProvider<<<FSet::D as DateDataMarkers>::Skel as CalMarkers<ErasedMarker<PackedPatternsV1<'static>>>>::Chinese> + DataProvider<<<FSet::D as DateDataMarkers>::Skel as CalMarkers<ErasedMarker<PackedPatternsV1<'static>>>>::Coptic> + DataProvider<<<FSet::D as DateDataMarkers>::Skel as CalMarkers<ErasedMarker<PackedPatternsV1<'static>>>>::Dangi> + DataProvider<<<FSet::D as DateDataMarkers>::Skel as CalMarkers<ErasedMarker<PackedPatternsV1<'static>>>>::Ethiopian> + DataProvider<<<FSet::D as DateDataMarkers>::Skel as CalMarkers<ErasedMarker<PackedPatternsV1<'static>>>>::EthiopianAmeteAlem> + DataProvider<<<FSet::D as DateDataMarkers>::Skel as CalMarkers<ErasedMarker<PackedPatternsV1<'static>>>>::Gregorian> + DataProvider<<<FSet::D as DateDataMarkers>::Skel as CalMarkers<ErasedMarker<PackedPatternsV1<'static>>>>::Hebrew> + DataProvider<<<FSet::D as DateDataMarkers>::Skel as CalMarkers<ErasedMarker<PackedPatternsV1<'static>>>>::Indian> + DataProvider<<<FSet::D as DateDataMarkers>::Skel as CalMarkers<ErasedMarker<PackedPatternsV1<'static>>>>::IslamicCivil> + DataProvider<<<FSet::D as DateDataMarkers>::Skel as CalMarkers<ErasedMarker<PackedPatternsV1<'static>>>>::IslamicObservational> + DataProvider<<<FSet::D as DateDataMarkers>::Skel as CalMarkers<ErasedMarker<PackedPatternsV1<'static>>>>::IslamicTabular> + DataProvider<<<FSet::D as DateDataMarkers>::Skel as CalMarkers<ErasedMarker<PackedPatternsV1<'static>>>>::IslamicUmmAlQura> + DataProvider<<<FSet::D as DateDataMarkers>::Skel as CalMarkers<ErasedMarker<PackedPatternsV1<'static>>>>::Japanese> + DataProvider<<<FSet::D as DateDataMarkers>::Skel as CalMarkers<ErasedMarker<PackedPatternsV1<'static>>>>::JapaneseExtended> + DataProvider<<<FSet::D as DateDataMarkers>::Skel as CalMarkers<ErasedMarker<PackedPatternsV1<'static>>>>::Persian> + DataProvider<<<FSet::D as DateDataMarkers>::Skel as CalMarkers<ErasedMarker<PackedPatternsV1<'static>>>>::Roc> + DataProvider<<FSet::D as DateDataMarkers>::WeekdayNamesV1Marker> + DataProvider<<FSet::T as TimeMarkers>::DayPeriodNamesV1Marker> + DataProvider<<FSet::T as TimeMarkers>::TimeSkeletonPatternsV1Marker> + DataProvider<<FSet::Z as ZoneMarkers>::EssentialsV1Marker> + DataProvider<<FSet::Z as ZoneMarkers>::LocationsV1Marker> + DataProvider<<FSet::Z as ZoneMarkers>::GenericLongV1Marker> + DataProvider<<FSet::Z as ZoneMarkers>::GenericShortV1Marker> + DataProvider<<FSet::Z as ZoneMarkers>::SpecificLongV1Marker> + DataProvider<<FSet::Z as ZoneMarkers>::SpecificShortV1Marker> + DataProvider<<FSet::Z as ZoneMarkers>::MetazonePeriodV1Marker> + DataProvider<FSet::GluePatternV1Marker> + DataProvider<ChineseCacheV1Marker> + DataProvider<DangiCacheV1Marker> + DataProvider<IslamicObservationalCacheV1Marker> + DataProvider<IslamicUmmAlQuraCacheV1Marker> + DataProvider<JapaneseErasV1Marker> + DataProvider<JapaneseExtendedErasV1Marker> + DataProvider<DecimalSymbolsV1Marker>,

A version of Self::try_new that uses custom data provided by a DataProvider.

📚 Help choosing a constructor

⚠️ The bounds on provider may change over time, including in SemVer minor releases.
source§

impl<FSet: DateTimeMarkers> NeoFormatter<FSet>
where FSet::D: DateInputMarkers, FSet::T: TimeMarkers, FSet::Z: ZoneMarkers,

source

pub fn strict_format<I>( &self, datetime: &I, ) -> Result<FormattedNeoDateTime<'_>, MismatchedCalendarError>

Formats a datetime, checking that the calendar system is correct.

If the datetime is not in the same calendar system as the formatter, an error is returned.

§Examples

Mismatched calendars will return an error:

use icu::calendar::Date;
use icu::datetime::neo::NeoFormatter;
use icu::datetime::neo_marker::NeoYearMonthDayMarker;
use icu::datetime::neo_skeleton::NeoSkeletonLength;
use icu::datetime::MismatchedCalendarError;
use icu::locale::locale;

let formatter = NeoFormatter::try_new(
    &locale!("en-u-ca-hebrew").into(),
    NeoYearMonthDayMarker::with_length(NeoSkeletonLength::Long),
)
.unwrap();

let date = Date::try_new_gregorian(2023, 12, 20).unwrap();

assert!(matches!(
    formatter.strict_format(&date),
    Err(MismatchedCalendarError { .. })
));

A time cannot be passed into the formatter when a date is expected:

use icu::calendar::Time;
use icu::datetime::neo::NeoFormatter;
use icu::datetime::neo_marker::NeoYearMonthDayMarker;
use icu::datetime::neo_skeleton::NeoSkeletonLength;
use icu::locale::locale;

let formatter = NeoFormatter::try_new(
    &locale!("es-MX").into(),
    NeoSkeletonLength::Long.into(),
)
.unwrap();

// the trait `GetField<AnyCalendarKind>`
// is not implemented for `icu::icu_calendar::Time`
formatter.strict_format(&Time::try_new(0, 0, 0, 0).unwrap());
source

pub fn convert_and_format<'a, I>( &'a self, datetime: &I, ) -> FormattedNeoDateTime<'a>
where I: ?Sized + ConvertCalendar, I::Converted<'a>: Sized + AllInputMarkers<FSet>,

Formats a datetime after first converting it to the formatter’s calendar.

§Examples

Mismatched calendars convert and format automatically:

use icu::calendar::Date;
use icu::datetime::neo::NeoFormatter;
use icu::datetime::neo_marker::NeoYearMonthDayMarker;
use icu::datetime::neo_skeleton::NeoSkeletonLength;
use icu::datetime::MismatchedCalendarError;
use icu::locale::locale;
use writeable::assert_try_writeable_eq;

let formatter = NeoFormatter::try_new(
    &locale!("en-u-ca-hebrew").into(),
    NeoYearMonthDayMarker::with_length(NeoSkeletonLength::Long),
)
.unwrap();

let date = Date::try_new_roc(113, 5, 8).unwrap();

assert_try_writeable_eq!(
    formatter.convert_and_format(&date),
    "30 Nisan 5784"
);

A time cannot be passed into the formatter when a date is expected:

use icu::calendar::Time;
use icu::datetime::neo::NeoFormatter;
use icu::datetime::neo_marker::NeoYearMonthDayMarker;
use icu::datetime::neo_skeleton::NeoSkeletonLength;
use icu::locale::locale;

let formatter = NeoFormatter::try_new(
    &locale!("es-MX").into(),
    NeoSkeletonLength::Long.into(),
)
.unwrap();

// the trait `GetField<AnyCalendarKind>`
// is not implemented for `icu::icu_calendar::Time`
formatter.convert_and_format(&Time::try_new(0, 0, 0, 0).unwrap());
source§

impl<FSet: DateTimeMarkers> NeoFormatter<FSet>

source

pub fn try_into_typed_formatter<C>( self, ) -> Result<TypedNeoFormatter<C, FSet>, MismatchedCalendarError>
where C: CldrCalendar + IntoAnyCalendar,

Attempt to convert this NeoFormatter into one with a specific calendar.

Returns an error if the type parameter does not match the inner calendar.

§Examples
use icu::calendar::Date;
use icu::calendar::cal::Hebrew;
use icu::datetime::neo::NeoFormatter;
use icu::datetime::neo_marker::NeoYearMonthDayMarker;
use icu::datetime::neo_skeleton::NeoSkeletonLength;
use icu::locale::locale;
use writeable::assert_try_writeable_eq;

let formatter = NeoFormatter::try_new(
    &locale!("en-u-ca-hebrew").into(),
    NeoYearMonthDayMarker::with_length(NeoSkeletonLength::Long),
)
.unwrap()
.try_into_typed_formatter::<Hebrew>()
.unwrap();

let date = Date::try_new_hebrew(5785, 1, 12).unwrap();

assert_try_writeable_eq!(
    formatter.format(&date),
    "12 Tishri 5785"
);

An error occurs if the calendars don’t match:

use icu::calendar::Date;
use icu::calendar::cal::Hebrew;
use icu::datetime::neo::NeoFormatter;
use icu::datetime::neo_marker::NeoYearMonthDayMarker;
use icu::datetime::MismatchedCalendarError;
use icu::datetime::neo_skeleton::NeoSkeletonLength;
use icu::locale::locale;

let result = NeoFormatter::try_new(
    &locale!("en-u-ca-buddhist").into(),
    NeoYearMonthDayMarker::with_length(NeoSkeletonLength::Long),
)
.unwrap()
.try_into_typed_formatter::<Hebrew>();

assert!(matches!(
    result,
    Err(MismatchedCalendarError { .. })
));

Trait Implementations§

source§

impl<FSet: Debug + DateTimeNamesMarker> Debug for NeoFormatter<FSet>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<FSet> Freeze for NeoFormatter<FSet>
where <<FSet as DateTimeNamesMarker>::YearNames as DateTimeNamesHolderTrait<YearNamesV1Marker>>::Container<FieldLength>: Freeze, <<FSet as DateTimeNamesMarker>::MonthNames as DateTimeNamesHolderTrait<MonthNamesV1Marker>>::Container<(Month, FieldLength)>: Freeze, <<FSet as DateTimeNamesMarker>::WeekdayNames as DateTimeNamesHolderTrait<WeekdayNamesV1Marker>>::Container<(Weekday, FieldLength)>: Freeze, <<FSet as DateTimeNamesMarker>::DayPeriodNames as DateTimeNamesHolderTrait<DayPeriodNamesV1Marker>>::Container<FieldLength>: Freeze, <<FSet as DateTimeNamesMarker>::ZoneEssentials as DateTimeNamesHolderTrait<TimeZoneEssentialsV1Marker>>::Container<()>: Freeze, <<FSet as DateTimeNamesMarker>::ZoneLocations as DateTimeNamesHolderTrait<LocationsV1Marker>>::Container<()>: Freeze, <<FSet as DateTimeNamesMarker>::ZoneGenericLong as DateTimeNamesHolderTrait<MetazoneGenericNamesLongV1Marker>>::Container<()>: Freeze, <<FSet as DateTimeNamesMarker>::ZoneGenericShort as DateTimeNamesHolderTrait<MetazoneGenericNamesShortV1Marker>>::Container<()>: Freeze, <<FSet as DateTimeNamesMarker>::ZoneSpecificLong as DateTimeNamesHolderTrait<MetazoneSpecificNamesLongV1Marker>>::Container<()>: Freeze, <<FSet as DateTimeNamesMarker>::ZoneSpecificShort as DateTimeNamesHolderTrait<MetazoneSpecificNamesShortV1Marker>>::Container<()>: Freeze, <<FSet as DateTimeNamesMarker>::MetazoneLookup as DateTimeNamesHolderTrait<MetazonePeriodV1Marker>>::Container<()>: Freeze,

§

impl<FSet> RefUnwindSafe for NeoFormatter<FSet>
where <<FSet as DateTimeNamesMarker>::YearNames as DateTimeNamesHolderTrait<YearNamesV1Marker>>::Container<FieldLength>: RefUnwindSafe, <<FSet as DateTimeNamesMarker>::MonthNames as DateTimeNamesHolderTrait<MonthNamesV1Marker>>::Container<(Month, FieldLength)>: RefUnwindSafe, <<FSet as DateTimeNamesMarker>::WeekdayNames as DateTimeNamesHolderTrait<WeekdayNamesV1Marker>>::Container<(Weekday, FieldLength)>: RefUnwindSafe, <<FSet as DateTimeNamesMarker>::DayPeriodNames as DateTimeNamesHolderTrait<DayPeriodNamesV1Marker>>::Container<FieldLength>: RefUnwindSafe, <<FSet as DateTimeNamesMarker>::ZoneEssentials as DateTimeNamesHolderTrait<TimeZoneEssentialsV1Marker>>::Container<()>: RefUnwindSafe, <<FSet as DateTimeNamesMarker>::ZoneLocations as DateTimeNamesHolderTrait<LocationsV1Marker>>::Container<()>: RefUnwindSafe, <<FSet as DateTimeNamesMarker>::ZoneGenericLong as DateTimeNamesHolderTrait<MetazoneGenericNamesLongV1Marker>>::Container<()>: RefUnwindSafe, <<FSet as DateTimeNamesMarker>::ZoneGenericShort as DateTimeNamesHolderTrait<MetazoneGenericNamesShortV1Marker>>::Container<()>: RefUnwindSafe, <<FSet as DateTimeNamesMarker>::ZoneSpecificLong as DateTimeNamesHolderTrait<MetazoneSpecificNamesLongV1Marker>>::Container<()>: RefUnwindSafe, <<FSet as DateTimeNamesMarker>::ZoneSpecificShort as DateTimeNamesHolderTrait<MetazoneSpecificNamesShortV1Marker>>::Container<()>: RefUnwindSafe, <<FSet as DateTimeNamesMarker>::MetazoneLookup as DateTimeNamesHolderTrait<MetazonePeriodV1Marker>>::Container<()>: RefUnwindSafe, FSet: RefUnwindSafe,

§

impl<FSet> Send for NeoFormatter<FSet>
where <<FSet as DateTimeNamesMarker>::YearNames as DateTimeNamesHolderTrait<YearNamesV1Marker>>::Container<FieldLength>: Send, <<FSet as DateTimeNamesMarker>::MonthNames as DateTimeNamesHolderTrait<MonthNamesV1Marker>>::Container<(Month, FieldLength)>: Send, <<FSet as DateTimeNamesMarker>::WeekdayNames as DateTimeNamesHolderTrait<WeekdayNamesV1Marker>>::Container<(Weekday, FieldLength)>: Send, <<FSet as DateTimeNamesMarker>::DayPeriodNames as DateTimeNamesHolderTrait<DayPeriodNamesV1Marker>>::Container<FieldLength>: Send, <<FSet as DateTimeNamesMarker>::ZoneEssentials as DateTimeNamesHolderTrait<TimeZoneEssentialsV1Marker>>::Container<()>: Send, <<FSet as DateTimeNamesMarker>::ZoneLocations as DateTimeNamesHolderTrait<LocationsV1Marker>>::Container<()>: Send, <<FSet as DateTimeNamesMarker>::ZoneGenericLong as DateTimeNamesHolderTrait<MetazoneGenericNamesLongV1Marker>>::Container<()>: Send, <<FSet as DateTimeNamesMarker>::ZoneGenericShort as DateTimeNamesHolderTrait<MetazoneGenericNamesShortV1Marker>>::Container<()>: Send, <<FSet as DateTimeNamesMarker>::ZoneSpecificLong as DateTimeNamesHolderTrait<MetazoneSpecificNamesLongV1Marker>>::Container<()>: Send, <<FSet as DateTimeNamesMarker>::ZoneSpecificShort as DateTimeNamesHolderTrait<MetazoneSpecificNamesShortV1Marker>>::Container<()>: Send, <<FSet as DateTimeNamesMarker>::MetazoneLookup as DateTimeNamesHolderTrait<MetazonePeriodV1Marker>>::Container<()>: Send, FSet: Send,

§

impl<FSet> Sync for NeoFormatter<FSet>
where <<FSet as DateTimeNamesMarker>::YearNames as DateTimeNamesHolderTrait<YearNamesV1Marker>>::Container<FieldLength>: Sync, <<FSet as DateTimeNamesMarker>::MonthNames as DateTimeNamesHolderTrait<MonthNamesV1Marker>>::Container<(Month, FieldLength)>: Sync, <<FSet as DateTimeNamesMarker>::WeekdayNames as DateTimeNamesHolderTrait<WeekdayNamesV1Marker>>::Container<(Weekday, FieldLength)>: Sync, <<FSet as DateTimeNamesMarker>::DayPeriodNames as DateTimeNamesHolderTrait<DayPeriodNamesV1Marker>>::Container<FieldLength>: Sync, <<FSet as DateTimeNamesMarker>::ZoneEssentials as DateTimeNamesHolderTrait<TimeZoneEssentialsV1Marker>>::Container<()>: Sync, <<FSet as DateTimeNamesMarker>::ZoneLocations as DateTimeNamesHolderTrait<LocationsV1Marker>>::Container<()>: Sync, <<FSet as DateTimeNamesMarker>::ZoneGenericLong as DateTimeNamesHolderTrait<MetazoneGenericNamesLongV1Marker>>::Container<()>: Sync, <<FSet as DateTimeNamesMarker>::ZoneGenericShort as DateTimeNamesHolderTrait<MetazoneGenericNamesShortV1Marker>>::Container<()>: Sync, <<FSet as DateTimeNamesMarker>::ZoneSpecificLong as DateTimeNamesHolderTrait<MetazoneSpecificNamesLongV1Marker>>::Container<()>: Sync, <<FSet as DateTimeNamesMarker>::ZoneSpecificShort as DateTimeNamesHolderTrait<MetazoneSpecificNamesShortV1Marker>>::Container<()>: Sync, <<FSet as DateTimeNamesMarker>::MetazoneLookup as DateTimeNamesHolderTrait<MetazonePeriodV1Marker>>::Container<()>: Sync, FSet: Sync,

§

impl<FSet> Unpin for NeoFormatter<FSet>
where <<FSet as DateTimeNamesMarker>::YearNames as DateTimeNamesHolderTrait<YearNamesV1Marker>>::Container<FieldLength>: Unpin, <<FSet as DateTimeNamesMarker>::MonthNames as DateTimeNamesHolderTrait<MonthNamesV1Marker>>::Container<(Month, FieldLength)>: Unpin, <<FSet as DateTimeNamesMarker>::WeekdayNames as DateTimeNamesHolderTrait<WeekdayNamesV1Marker>>::Container<(Weekday, FieldLength)>: Unpin, <<FSet as DateTimeNamesMarker>::DayPeriodNames as DateTimeNamesHolderTrait<DayPeriodNamesV1Marker>>::Container<FieldLength>: Unpin, <<FSet as DateTimeNamesMarker>::ZoneEssentials as DateTimeNamesHolderTrait<TimeZoneEssentialsV1Marker>>::Container<()>: Unpin, <<FSet as DateTimeNamesMarker>::ZoneLocations as DateTimeNamesHolderTrait<LocationsV1Marker>>::Container<()>: Unpin, <<FSet as DateTimeNamesMarker>::ZoneGenericLong as DateTimeNamesHolderTrait<MetazoneGenericNamesLongV1Marker>>::Container<()>: Unpin, <<FSet as DateTimeNamesMarker>::ZoneGenericShort as DateTimeNamesHolderTrait<MetazoneGenericNamesShortV1Marker>>::Container<()>: Unpin, <<FSet as DateTimeNamesMarker>::ZoneSpecificLong as DateTimeNamesHolderTrait<MetazoneSpecificNamesLongV1Marker>>::Container<()>: Unpin, <<FSet as DateTimeNamesMarker>::ZoneSpecificShort as DateTimeNamesHolderTrait<MetazoneSpecificNamesShortV1Marker>>::Container<()>: Unpin, <<FSet as DateTimeNamesMarker>::MetazoneLookup as DateTimeNamesHolderTrait<MetazonePeriodV1Marker>>::Container<()>: Unpin, FSet: Unpin,

§

impl<FSet> UnwindSafe for NeoFormatter<FSet>
where <<FSet as DateTimeNamesMarker>::YearNames as DateTimeNamesHolderTrait<YearNamesV1Marker>>::Container<FieldLength>: UnwindSafe, <<FSet as DateTimeNamesMarker>::MonthNames as DateTimeNamesHolderTrait<MonthNamesV1Marker>>::Container<(Month, FieldLength)>: UnwindSafe, <<FSet as DateTimeNamesMarker>::WeekdayNames as DateTimeNamesHolderTrait<WeekdayNamesV1Marker>>::Container<(Weekday, FieldLength)>: UnwindSafe, <<FSet as DateTimeNamesMarker>::DayPeriodNames as DateTimeNamesHolderTrait<DayPeriodNamesV1Marker>>::Container<FieldLength>: UnwindSafe, <<FSet as DateTimeNamesMarker>::ZoneEssentials as DateTimeNamesHolderTrait<TimeZoneEssentialsV1Marker>>::Container<()>: UnwindSafe, <<FSet as DateTimeNamesMarker>::ZoneLocations as DateTimeNamesHolderTrait<LocationsV1Marker>>::Container<()>: UnwindSafe, <<FSet as DateTimeNamesMarker>::ZoneGenericLong as DateTimeNamesHolderTrait<MetazoneGenericNamesLongV1Marker>>::Container<()>: UnwindSafe, <<FSet as DateTimeNamesMarker>::ZoneGenericShort as DateTimeNamesHolderTrait<MetazoneGenericNamesShortV1Marker>>::Container<()>: UnwindSafe, <<FSet as DateTimeNamesMarker>::ZoneSpecificLong as DateTimeNamesHolderTrait<MetazoneSpecificNamesLongV1Marker>>::Container<()>: UnwindSafe, <<FSet as DateTimeNamesMarker>::ZoneSpecificShort as DateTimeNamesHolderTrait<MetazoneSpecificNamesShortV1Marker>>::Container<()>: UnwindSafe, <<FSet as DateTimeNamesMarker>::MetazoneLookup as DateTimeNamesHolderTrait<MetazonePeriodV1Marker>>::Container<()>: UnwindSafe, FSet: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> ErasedDestructor for T
where T: 'static,

§

impl<T> MaybeSendSync for T
where T: Send + Sync,