pub struct FluentDateTimeOptions { /* private fields */ }
Expand description
Options for formatting a DateTime
Implementations§
Source§impl FluentDateTimeOptions
impl FluentDateTimeOptions
Sourcepub fn set_date_style(&mut self, style: Option<Date>)
pub fn set_date_style(&mut self, style: Option<Date>)
Set a date style, from verbose to compact
Sourcepub fn set_time_style(&mut self, style: Option<Time>)
pub fn set_time_style(&mut self, style: Option<Time>)
Set a time style, from verbose to compact
Trait Implementations§
Source§impl Clone for FluentDateTimeOptions
impl Clone for FluentDateTimeOptions
Source§fn clone(&self) -> FluentDateTimeOptions
fn clone(&self) -> FluentDateTimeOptions
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for FluentDateTimeOptions
impl Debug for FluentDateTimeOptions
Source§impl Default for FluentDateTimeOptions
impl Default for FluentDateTimeOptions
Source§fn default() -> Self
fn default() -> Self
Defaults to showing a short date
The intent is to emulate Intl.DateTimeFormat behavior:
The default value for each date-time component option is undefined, but if all component properties are undefined, then year, month, and day default to “numeric”. If any of the date-time component options is specified, then dateStyle and timeStyle must be undefined.
In terms of the current Rust implementation:
The default value for each date-time style option is None, but if both
are unset, we display the date only, using the length::Date::Short
style.
Source§impl Hash for FluentDateTimeOptions
impl Hash for FluentDateTimeOptions
Source§impl PartialEq for FluentDateTimeOptions
impl PartialEq for FluentDateTimeOptions
impl Eq for FluentDateTimeOptions
impl StructuralPartialEq for FluentDateTimeOptions
Auto Trait Implementations§
impl Freeze for FluentDateTimeOptions
impl RefUnwindSafe for FluentDateTimeOptions
impl Send for FluentDateTimeOptions
impl Sync for FluentDateTimeOptions
impl Unpin for FluentDateTimeOptions
impl UnwindSafe for FluentDateTimeOptions
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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