#[non_exhaustive]pub enum DateTimeFormatterOptions {
Length(Bag),
}
Expand description
A bag of options which, together with Locale
, defines how
dates will be formatted with a TypedDateTimeFormatter
instance.
Each variant of the bag is a combination of settings defining how to format
the date, with an optional Preferences
which represent user preferences and
may alter how the selected pattern is formatted.
§Examples
use icu::datetime::options::length;
let bag = length::Bag::from_date_time_style(
length::Date::Medium,
length::Time::Short,
);
At the moment only the length::Bag
works, and we plan to extend that to support
ECMA402
like components bag later.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Trait Implementations§
source§impl Clone for DateTimeFormatterOptions
impl Clone for DateTimeFormatterOptions
source§fn clone(&self) -> DateTimeFormatterOptions
fn clone(&self) -> DateTimeFormatterOptions
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 DateTimeFormatterOptions
impl Debug for DateTimeFormatterOptions
source§impl Default for DateTimeFormatterOptions
impl Default for DateTimeFormatterOptions
source§impl From<Bag> for DateTimeFormatterOptions
impl From<Bag> for DateTimeFormatterOptions
source§impl Hash for DateTimeFormatterOptions
impl Hash for DateTimeFormatterOptions
source§impl PartialEq for DateTimeFormatterOptions
impl PartialEq for DateTimeFormatterOptions
source§fn eq(&self, other: &DateTimeFormatterOptions) -> bool
fn eq(&self, other: &DateTimeFormatterOptions) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for DateTimeFormatterOptions
impl Eq for DateTimeFormatterOptions
impl StructuralPartialEq for DateTimeFormatterOptions
Auto Trait Implementations§
impl Freeze for DateTimeFormatterOptions
impl RefUnwindSafe for DateTimeFormatterOptions
impl Send for DateTimeFormatterOptions
impl Sync for DateTimeFormatterOptions
impl Unpin for DateTimeFormatterOptions
impl UnwindSafe for DateTimeFormatterOptions
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