Struct icu_capi::zoned_formatter::ffi::ZonedDateTimeFormatter
source · pub struct ZonedDateTimeFormatter(pub DateTimeFormatter<Combo<YMDT, Vs>>);
Expand description
An object capable of formatting a date time with time zone to a string.
Tuple Fields§
§0: DateTimeFormatter<Combo<YMDT, Vs>>
Implementations§
source§impl ZonedDateTimeFormatter
impl ZonedDateTimeFormatter
sourcepub fn create_with_length(
locale: &Locale,
length: DateTimeLength,
) -> Result<Box<ZonedDateTimeFormatter>, DateTimeFormatterLoadError>
pub fn create_with_length( locale: &Locale, length: DateTimeLength, ) -> Result<Box<ZonedDateTimeFormatter>, DateTimeFormatterLoadError>
Creates a new ZonedDateTimeFormatter
from locale data using compiled data.
This function has date_length
and time_length
arguments and uses default options
for the time zone.
sourcepub fn create_with_length_and_provider(
provider: &DataProvider,
locale: &Locale,
length: DateTimeLength,
) -> Result<Box<ZonedDateTimeFormatter>, DateTimeFormatterLoadError>
pub fn create_with_length_and_provider( provider: &DataProvider, locale: &Locale, length: DateTimeLength, ) -> Result<Box<ZonedDateTimeFormatter>, DateTimeFormatterLoadError>
Creates a new ZonedDateTimeFormatter
from locale data using a particular data source.
This function has date_length
and time_length
arguments and uses default options
for the time zone.
sourcepub fn format_datetime_with_custom_time_zone(
&self,
datetime: &DateTime,
time_zone: &TimeZoneInfo,
write: &mut DiplomatWrite,
) -> Result<(), DateTimeFormatError>
pub fn format_datetime_with_custom_time_zone( &self, datetime: &DateTime, time_zone: &TimeZoneInfo, write: &mut DiplomatWrite, ) -> Result<(), DateTimeFormatError>
Formats a DateTime
and TimeZoneInfo
to a string.
sourcepub fn format_iso_datetime_with_custom_time_zone(
&self,
datetime: &IsoDateTime,
time_zone: &TimeZoneInfo,
write: &mut DiplomatWrite,
) -> Result<(), DateTimeFormatError>
pub fn format_iso_datetime_with_custom_time_zone( &self, datetime: &IsoDateTime, time_zone: &TimeZoneInfo, write: &mut DiplomatWrite, ) -> Result<(), DateTimeFormatError>
Formats a IsoDateTime
and TimeZoneInfo
to a string.
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