Enum icu::datetime::DateTimeFormatterOptions
source · [−]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, DateTimeFormatterOptions};
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
Length(Bag)
Bag of lengths for date and time.
Components(Bag)
Bag of components describing which fields and how should be displayed.
Trait Implementations
sourceimpl Clone for DateTimeFormatterOptions
impl Clone for DateTimeFormatterOptions
sourcefn clone(&self) -> DateTimeFormatterOptions
fn clone(&self) -> DateTimeFormatterOptions
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for DateTimeFormatterOptions
impl Debug for DateTimeFormatterOptions
sourceimpl Default for DateTimeFormatterOptions
impl Default for DateTimeFormatterOptions
sourcefn default() -> DateTimeFormatterOptions
fn default() -> DateTimeFormatterOptions
Returns the “default value” for a type. Read more
sourceimpl From<Bag> for DateTimeFormatterOptions
impl From<Bag> for DateTimeFormatterOptions
sourcefn from(input: Bag) -> DateTimeFormatterOptions
fn from(input: Bag) -> DateTimeFormatterOptions
Converts to this type from the input type.
sourceimpl From<Bag> for DateTimeFormatterOptions
impl From<Bag> for DateTimeFormatterOptions
sourcefn from(input: Bag) -> DateTimeFormatterOptions
fn from(input: Bag) -> DateTimeFormatterOptions
Converts to this type from the input type.
Auto Trait Implementations
impl RefUnwindSafe for DateTimeFormatterOptions
impl Send for DateTimeFormatterOptions
impl Sync for DateTimeFormatterOptions
impl Unpin for DateTimeFormatterOptions
impl UnwindSafe for DateTimeFormatterOptions
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more