pub(crate) enum FallbackTimeZoneFormatterUnit {
LocalizedGmt(LocalizedGmtFormat),
Iso8601(Iso8601Format),
}
Variants§
LocalizedGmt(LocalizedGmtFormat)
Iso8601(Iso8601Format)
Trait Implementations§
source§impl Clone for FallbackTimeZoneFormatterUnit
impl Clone for FallbackTimeZoneFormatterUnit
source§fn clone(&self) -> FallbackTimeZoneFormatterUnit
fn clone(&self) -> FallbackTimeZoneFormatterUnit
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 FormatTimeZone for FallbackTimeZoneFormatterUnit
impl FormatTimeZone for FallbackTimeZoneFormatterUnit
source§fn format<W: PartsWrite + ?Sized>(
&self,
sink: &mut W,
time_zone: &impl TimeZoneInput,
data_payloads: &TimeZoneDataPayloads,
) -> Result<Result, DateTimeError>
fn format<W: PartsWrite + ?Sized>( &self, sink: &mut W, time_zone: &impl TimeZoneInput, data_payloads: &TimeZoneDataPayloads, ) -> Result<Result, DateTimeError>
Tries to write the timezone to the sink. If a DateTimeError is returned, the sink
has not been touched, so another format can be attempted.
source§impl FormatTimeZoneWithFallback for FallbackTimeZoneFormatterUnit
impl FormatTimeZoneWithFallback for FallbackTimeZoneFormatterUnit
fn format_gmt_offset<W: PartsWrite + ?Sized>( &self, sink: &mut W, gmt_offset: GmtOffset, data_payloads: &TimeZoneDataPayloads, ) -> Result
source§fn format_with_last_resort_fallback<W: PartsWrite + ?Sized>(
&self,
sink: &mut W,
time_zone: &impl TimeZoneInput,
data_payloads: &TimeZoneDataPayloads,
) -> Result<Result<(), DateTimeError>, Error>
fn format_with_last_resort_fallback<W: PartsWrite + ?Sized>( &self, sink: &mut W, time_zone: &impl TimeZoneInput, data_payloads: &TimeZoneDataPayloads, ) -> Result<Result<(), DateTimeError>, Error>
Formats the GMT offset, or falls back to a fallback string. This does
lossy writing, so even in the Ok(Err(_)) case, something has been written.
source§impl From<FallbackFormat> for FallbackTimeZoneFormatterUnit
impl From<FallbackFormat> for FallbackTimeZoneFormatterUnit
Load a fallback format for timezone. The fallback format will be executed if there are no matching format results.
source§fn from(value: FallbackFormat) -> Self
fn from(value: FallbackFormat) -> Self
Converts to this type from the input type.
source§impl PartialEq for FallbackTimeZoneFormatterUnit
impl PartialEq for FallbackTimeZoneFormatterUnit
source§fn eq(&self, other: &FallbackTimeZoneFormatterUnit) -> bool
fn eq(&self, other: &FallbackTimeZoneFormatterUnit) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.impl Copy for FallbackTimeZoneFormatterUnit
impl StructuralPartialEq for FallbackTimeZoneFormatterUnit
Auto Trait Implementations§
impl Freeze for FallbackTimeZoneFormatterUnit
impl RefUnwindSafe for FallbackTimeZoneFormatterUnit
impl Send for FallbackTimeZoneFormatterUnit
impl Sync for FallbackTimeZoneFormatterUnit
impl Unpin for FallbackTimeZoneFormatterUnit
impl UnwindSafe for FallbackTimeZoneFormatterUnit
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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