Struct icu_datetime::raw::zoned_datetime::ZonedDateTimeFormatter
source · pub(crate) struct ZonedDateTimeFormatter {
pub datetime_format: DateTimeFormatter,
pub time_zone_format: TimeZoneFormatter,
}
Expand description
This is the internal “raw” version of crate::ZonedDateTimeFormatter, i.e. a version of ZonedDateTimeFormatter without the generic parameter. The actual implementation of crate::ZonedDateTimeFormatter should live here.
Fields§
§datetime_format: DateTimeFormatter
§time_zone_format: TimeZoneFormatter
Implementations§
source§impl ZonedDateTimeFormatter
impl ZonedDateTimeFormatter
pub fn try_new( patterns: DataPayload<PatternPluralsFromPatternsV1Marker>, symbols_data_fn: impl FnOnce() -> Result<DataPayload<ErasedDateSymbolsV1Marker>, DataError>, locale: &DataLocale, time_zone_format_options: TimeZoneFormatterOptions, ) -> Result<Self, DateTimeError>
pub fn try_new_unstable<P>(
provider: &P,
patterns: DataPayload<PatternPluralsFromPatternsV1Marker>,
symbols_data_fn: impl FnOnce() -> Result<DataPayload<ErasedDateSymbolsV1Marker>, DataError>,
locale: &DataLocale,
time_zone_format_options: TimeZoneFormatterOptions,
) -> Result<Self, DateTimeError>where
P: DataProvider<TimeSymbolsV1Marker> + DataProvider<TimeLengthsV1Marker> + DataProvider<WeekDataV1Marker> + DataProvider<TimeZoneFormatsV1Marker> + DataProvider<ExemplarCitiesV1Marker> + DataProvider<MetazoneGenericNamesLongV1Marker> + DataProvider<MetazoneGenericNamesShortV1Marker> + DataProvider<MetazoneSpecificNamesLongV1Marker> + DataProvider<MetazoneSpecificNamesShortV1Marker> + DataProvider<OrdinalV1Marker> + DataProvider<DecimalSymbolsV1Marker> + ?Sized,
sourcepub fn format<'l>(
&'l self,
date: &impl DateTimeInput,
time_zone: &impl TimeZoneInput,
) -> FormattedZonedDateTime<'l>
pub fn format<'l>( &'l self, date: &impl DateTimeInput, time_zone: &impl TimeZoneInput, ) -> FormattedZonedDateTime<'l>
Takes a [ZonedDateTimeInput
] implementer and returns an instance of a FormattedZonedDateTime
that contains all information necessary to display a formatted zoned datetime and operate on it.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ZonedDateTimeFormatter
impl RefUnwindSafe for ZonedDateTimeFormatter
impl !Send for ZonedDateTimeFormatter
impl !Sync for ZonedDateTimeFormatter
impl Unpin for ZonedDateTimeFormatter
impl UnwindSafe for ZonedDateTimeFormatter
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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