Struct icu_capi::datetime_formatter::ffi::TimeFormatter
source · pub struct TimeFormatter(pub FixedCalendarDateTimeFormatter<(), T>);
Expand description
An ICU4X TimeFormatter object capable of formatting an Time
type (and others) as a string
Tuple Fields§
§0: FixedCalendarDateTimeFormatter<(), T>
Implementations§
source§impl TimeFormatter
impl TimeFormatter
sourcepub fn create_with_length(
provider: &DataProvider,
locale: &Locale,
length: DateTimeLength,
) -> Result<Box<TimeFormatter>, PatternLoadError>
pub fn create_with_length( provider: &DataProvider, locale: &Locale, length: DateTimeLength, ) -> Result<Box<TimeFormatter>, PatternLoadError>
Creates a new TimeFormatter
from locale data.
sourcepub fn format_time(&self, value: &Time, write: &mut DiplomatWrite)
pub fn format_time(&self, value: &Time, write: &mut DiplomatWrite)
Formats a Time
to a string.
sourcepub fn format_datetime(&self, value: &DateTime, write: &mut DiplomatWrite)
pub fn format_datetime(&self, value: &DateTime, write: &mut DiplomatWrite)
Formats a DateTime
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 TimeFormatter
impl RefUnwindSafe for TimeFormatter
impl Send for TimeFormatter
impl Sync for TimeFormatter
impl Unpin for TimeFormatter
impl UnwindSafe for TimeFormatter
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