pub enum DateTimeFormatInfoRef<'a> {
Borrowed(&'a DateTimeFormatInfo),
Shared(Rc<DateTimeFormatInfo>),
}Expand description
The conventions a DateTimeFormatProvider hands out: borrowed from the
provider or shared.
Variants§
Methods from Deref<Target = DateTimeFormatInfo>§
Sourcepub fn calendar(&self) -> GregorianCalendar
pub fn calendar(&self) -> GregorianCalendar
The calendar of the conventions; always the Gregorian one.
Sourcepub fn short_date_pattern(&self) -> &str
pub fn short_date_pattern(&self) -> &str
The pattern of a short date (format "d").
Sourcepub fn long_date_pattern(&self) -> &str
pub fn long_date_pattern(&self) -> &str
The pattern of a long date (format "D").
Sourcepub fn short_time_pattern(&self) -> &str
pub fn short_time_pattern(&self) -> &str
The pattern of a short time (format "t").
Sourcepub fn long_time_pattern(&self) -> &str
pub fn long_time_pattern(&self) -> &str
The pattern of a long time (format "T").
Sourcepub fn full_date_time_pattern(&self) -> Cow<'_, str>
pub fn full_date_time_pattern(&self) -> Cow<'_, str>
The pattern of a long date and long time (format "F"): the long
date pattern, a space and the long time pattern unless set explicitly.
Sourcepub fn month_day_pattern(&self) -> &str
pub fn month_day_pattern(&self) -> &str
The pattern of a month and day (format "M").
Sourcepub fn year_month_pattern(&self) -> &str
pub fn year_month_pattern(&self) -> &str
The pattern of a year and month (format "Y").
Sourcepub fn rfc1123_pattern(&self) -> &'static str
pub fn rfc1123_pattern(&self) -> &'static str
The pattern of the round-trip format "R" (RFC 1123).
Sourcepub fn sortable_date_time_pattern(&self) -> &'static str
pub fn sortable_date_time_pattern(&self) -> &'static str
The pattern of the sortable format "s".
Sourcepub fn universal_sortable_date_time_pattern(&self) -> &'static str
pub fn universal_sortable_date_time_pattern(&self) -> &'static str
The pattern of the universal sortable format "u".
Sourcepub fn am_designator(&self) -> &str
pub fn am_designator(&self) -> &str
The designator of hours before noon.
Sourcepub fn pm_designator(&self) -> &str
pub fn pm_designator(&self) -> &str
The designator of hours after noon.
Sourcepub fn date_separator(&self) -> &str
pub fn date_separator(&self) -> &str
The text the / specifier of a custom format produces.
Sourcepub fn time_separator(&self) -> &str
pub fn time_separator(&self) -> &str
The text the : specifier of a custom format produces.
Sourcepub fn first_day_of_week(&self) -> DayOfWeek
pub fn first_day_of_week(&self) -> DayOfWeek
The first day of the week.
Sourcepub fn calendar_week_rule(&self) -> CalendarWeekRule
pub fn calendar_week_rule(&self) -> CalendarWeekRule
The rule that determines the first week of a year.
Sourcepub fn day_names(&self) -> &[String; 7]
pub fn day_names(&self) -> &[String; 7]
The full names of the days, indexed by DayOfWeek (Sunday first).
Sourcepub fn abbreviated_day_names(&self) -> &[String; 7]
pub fn abbreviated_day_names(&self) -> &[String; 7]
The abbreviated names of the days, indexed by DayOfWeek.
Sourcepub fn shortest_day_names(&self) -> &[String; 7]
pub fn shortest_day_names(&self) -> &[String; 7]
The shortest unique names of the days, indexed by DayOfWeek.
Sourcepub fn month_names(&self) -> &[String; 13]
pub fn month_names(&self) -> &[String; 13]
The full names of the months; the thirteenth entry is empty, as in .NET.
Sourcepub fn abbreviated_month_names(&self) -> &[String; 13]
pub fn abbreviated_month_names(&self) -> &[String; 13]
The abbreviated names of the months; the thirteenth entry is empty.
Sourcepub fn get_day_name(&self, day_of_week: DayOfWeek) -> &str
pub fn get_day_name(&self, day_of_week: DayOfWeek) -> &str
The full name of a day.
Sourcepub fn get_abbreviated_day_name(&self, day_of_week: DayOfWeek) -> &str
pub fn get_abbreviated_day_name(&self, day_of_week: DayOfWeek) -> &str
The abbreviated name of a day.
Sourcepub fn get_shortest_day_name(&self, day_of_week: DayOfWeek) -> &str
pub fn get_shortest_day_name(&self, day_of_week: DayOfWeek) -> &str
The shortest name of a day.
Sourcepub fn get_month_name(&self, month: i32) -> &str
pub fn get_month_name(&self, month: i32) -> &str
The full name of a month, 1..=13. Panics for other values.
Sourcepub fn get_abbreviated_month_name(&self, month: i32) -> &str
pub fn get_abbreviated_month_name(&self, month: i32) -> &str
The abbreviated name of a month, 1..=13. Panics for other values.
Sourcepub fn get_era_name(&self, _era: i32) -> &str
pub fn get_era_name(&self, _era: i32) -> &str
The name of the only era of the Gregorian calendar (the g specifier).
Trait Implementations§
Source§impl Deref for DateTimeFormatInfoRef<'_>
impl Deref for DateTimeFormatInfoRef<'_>
Source§type Target = DateTimeFormatInfo
type Target = DateTimeFormatInfo
Source§fn deref(&self) -> &DateTimeFormatInfo
fn deref(&self) -> &DateTimeFormatInfo
Auto Trait Implementations§
impl<'a> !Send for DateTimeFormatInfoRef<'a>
impl<'a> !Sync for DateTimeFormatInfoRef<'a>
impl<'a> Freeze for DateTimeFormatInfoRef<'a>
impl<'a> RefUnwindSafe for DateTimeFormatInfoRef<'a>
impl<'a> Unpin for DateTimeFormatInfoRef<'a>
impl<'a> UnsafeUnpin for DateTimeFormatInfoRef<'a>
impl<'a> UnwindSafe for DateTimeFormatInfoRef<'a>
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
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
affects_render, metadata
overrides). Read more