Struct icu_capi::datetime_formatter::ffi::GregorianDateFormatter
source · pub struct GregorianDateFormatter(pub FixedCalendarDateTimeFormatter<Gregorian, YMD>);
Expand description
An ICU4X TypedDateFormatter object capable of formatting a IsoDateTime
as a string,
using the Gregorian Calendar.
Tuple Fields§
§0: FixedCalendarDateTimeFormatter<Gregorian, YMD>
Implementations§
source§impl GregorianDateFormatter
impl GregorianDateFormatter
sourcepub fn create_with_length(
locale: &Locale,
length: DateTimeLength,
) -> Result<Box<GregorianDateFormatter>, DateTimeFormatterLoadError>
pub fn create_with_length( locale: &Locale, length: DateTimeLength, ) -> Result<Box<GregorianDateFormatter>, DateTimeFormatterLoadError>
Creates a new GregorianDateFormatter
using compiled data.
sourcepub fn create_with_length_and_provider(
provider: &DataProvider,
locale: &Locale,
length: DateTimeLength,
) -> Result<Box<GregorianDateFormatter>, DateTimeFormatterLoadError>
pub fn create_with_length_and_provider( provider: &DataProvider, locale: &Locale, length: DateTimeLength, ) -> Result<Box<GregorianDateFormatter>, DateTimeFormatterLoadError>
Creates a new GregorianDateFormatter
using a particular data source.
sourcepub fn format_iso_date(&self, value: &IsoDate, write: &mut DiplomatWrite)
pub fn format_iso_date(&self, value: &IsoDate, write: &mut DiplomatWrite)
Formats a IsoDate
to a string.
sourcepub fn format_iso_datetime(
&self,
value: &IsoDateTime,
write: &mut DiplomatWrite,
)
pub fn format_iso_datetime( &self, value: &IsoDateTime, write: &mut DiplomatWrite, )
Formats a IsoDateTime
to a string.
Auto Trait Implementations§
impl Freeze for GregorianDateFormatter
impl RefUnwindSafe for GregorianDateFormatter
impl Send for GregorianDateFormatter
impl Sync for GregorianDateFormatter
impl Unpin for GregorianDateFormatter
impl UnwindSafe for GregorianDateFormatter
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