pub struct DateTimeFormatOptions {
Show 17 fields pub date_style: Option<Style>, pub time_style: Option<Style>, pub fractional_second_digits: Option<NonZeroU8>, pub calendar: Option<Calendar>, pub day_period: Option<DayPeriod>, pub numbering_system: Option<NumberingSystem>, pub time_zone: Option<TimeZone>, pub hour_cycle: Option<HourCycle>, pub weekday: Option<Weekday>, pub era: Option<Era>, pub year: Option<DisplaySize>, pub month: Option<Month>, pub day: Option<DisplaySize>, pub hour: Option<DisplaySize>, pub minute: Option<DisplaySize>, pub second: Option<DisplaySize>, pub time_zone_style: Option<TimeZoneStyle>,
}

Fields§

§date_style: Option<Style>

The formatting style to use for formatting the date part. If date_style or time_style are set, none of the other options are acceptable.

§time_style: Option<Style>

The formatting style to use for formatting the time part. If date_style or time_style are set, none of the other options are acceptable.

§fractional_second_digits: Option<NonZeroU8>

The number of fractional seconds to apply when calling format. Valid values are 1 to 3.

§calendar: Option<Calendar>

If left unspecified, the locale default is used.

§day_period: Option<DayPeriod>

If left unspecified, the locale default is used.

§numbering_system: Option<NumberingSystem>

If left unspecified, the locale default is used.

§time_zone: Option<TimeZone>

If left unspecified, the locale default is used.

§hour_cycle: Option<HourCycle>

If left unspecified, the locale default is used.

§weekday: Option<Weekday>

If left unspecified, the locale default is used.

§era: Option<Era>

If left unspecified, the locale default is used.

§year: Option<DisplaySize>

If left unspecified, the locale default is used.

§month: Option<Month>

If left unspecified, the locale default is used.

§day: Option<DisplaySize>

If left unspecified, the locale default is used.

§hour: Option<DisplaySize>

If left unspecified, the locale default is used.

§minute: Option<DisplaySize>

If left unspecified, the locale default is used.

§second: Option<DisplaySize>

If left unspecified, the locale default is used.

§time_zone_style: Option<TimeZoneStyle>

If left unspecified, the locale default is used.

Trait Implementations§

source§

impl Clone for DateTimeFormatOptions

source§

fn clone(&self) -> DateTimeFormatOptions

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for DateTimeFormatOptions

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for DateTimeFormatOptions

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl PartialEq for DateTimeFormatOptions

source§

fn eq(&self, other: &DateTimeFormatOptions) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Eq for DateTimeFormatOptions

source§

impl StructuralPartialEq for DateTimeFormatOptions

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.