#[non_exhaustive]#[repr(u8)]pub enum TimeZoneVariant {
Standard = 0,
Daylight = 1,
}
Expand description
A time zone variant, such as Standard Time, or Daylight/Summer Time.
This should not generally be constructed by client code. Instead, use
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Standard = 0
The variant corresponding to "standard"
in CLDR.
The semantics vary from time zone to time zone. The time zone display name of this variant may or may not be called “Standard Time”.
This is the variant with the lower UTC offset.
Daylight = 1
The variant corresponding to "daylight"
in CLDR.
The semantics vary from time zone to time zone. The time zone display name of this variant may or may not be called “Daylight Time”.
This is the variant with the higher UTC offset.
Implementations§
Source§impl TimeZoneVariant
impl TimeZoneVariant
Sourcepub const fn from_rearguard_isdst(isdst: bool) -> TimeZoneVariant
pub const fn from_rearguard_isdst(isdst: bool) -> TimeZoneVariant
Creates a zone variant from a TZDB isdst
flag, if it is known that the TZDB was built with
DATAFORM=rearguard
.
If it is known that the database was not built with rearguard
, a caller can try to adjust
for the differences. This is a moving target, for example the known differences for 2025a are:
Europe/Dublin
since 1968-10-27Africa/Windhoek
between 1994-03-20 and 2017-10-24Africa/Casablanca
andAfrica/El_Aaiun
since 2018-10-28
If the TZDB build mode is unknown or variable, use TimeZoneInfo::infer_variant
.
Trait Implementations§
Source§impl AsULE for TimeZoneVariant
impl AsULE for TimeZoneVariant
Source§type ULE = TimeZoneVariantULE
type ULE = TimeZoneVariantULE
Self
. Read moreSource§fn to_unaligned(self) -> <TimeZoneVariant as AsULE>::ULE
fn to_unaligned(self) -> <TimeZoneVariant as AsULE>::ULE
Source§fn from_unaligned(other: <TimeZoneVariant as AsULE>::ULE) -> TimeZoneVariant
fn from_unaligned(other: <TimeZoneVariant as AsULE>::ULE) -> TimeZoneVariant
Source§impl Clone for TimeZoneVariant
impl Clone for TimeZoneVariant
Source§fn clone(&self) -> TimeZoneVariant
fn clone(&self) -> TimeZoneVariant
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for TimeZoneVariant
impl Debug for TimeZoneVariant
Source§impl<'de> Deserialize<'de> for TimeZoneVariant
impl<'de> Deserialize<'de> for TimeZoneVariant
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<TimeZoneVariant, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<TimeZoneVariant, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl<O> GetField<TimeZoneVariant> for TimeZoneInfo<O>where
O: TimeZoneModel<TimeZoneVariant = TimeZoneVariant>,
impl<O> GetField<TimeZoneVariant> for TimeZoneInfo<O>where
O: TimeZoneModel<TimeZoneVariant = TimeZoneVariant>,
Source§fn get_field(&self) -> TimeZoneVariant
fn get_field(&self) -> TimeZoneVariant
T
.Source§impl<C, A, Z> GetField<TimeZoneVariant> for ZonedDateTime<A, Z>
impl<C, A, Z> GetField<TimeZoneVariant> for ZonedDateTime<A, Z>
Source§fn get_field(&self) -> TimeZoneVariant
fn get_field(&self) -> TimeZoneVariant
T
.Source§impl Hash for TimeZoneVariant
impl Hash for TimeZoneVariant
Source§impl IntoOption<TimeZoneVariant> for TimeZoneVariant
impl IntoOption<TimeZoneVariant> for TimeZoneVariant
Source§fn into_option(self) -> Option<TimeZoneVariant>
fn into_option(self) -> Option<TimeZoneVariant>
self
as an Option<T>
Source§impl Ord for TimeZoneVariant
impl Ord for TimeZoneVariant
Source§fn cmp(&self, other: &TimeZoneVariant) -> Ordering
fn cmp(&self, other: &TimeZoneVariant) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for TimeZoneVariant
impl PartialEq for TimeZoneVariant
Source§impl PartialOrd for TimeZoneVariant
impl PartialOrd for TimeZoneVariant
Source§impl<'a> ZeroMapKV<'a> for TimeZoneVariant
impl<'a> ZeroMapKV<'a> for TimeZoneVariant
Source§type Container = ZeroVec<'a, TimeZoneVariant>
type Container = ZeroVec<'a, TimeZoneVariant>
ZeroVec
or VarZeroVec
.type Slice = ZeroSlice<TimeZoneVariant>
Source§type GetType = TimeZoneVariantULE
type GetType = TimeZoneVariantULE
Container::get()
Read moreSource§type OwnedType = TimeZoneVariant
type OwnedType = TimeZoneVariant
Container::replace()
and Container::remove()
,
also used during deserialization. If Self
is human readable serialized,
deserializing to Self::OwnedType
should produce the same value once
passed through Self::owned_as_self()
Read moreimpl Copy for TimeZoneVariant
impl Eq for TimeZoneVariant
impl StructuralPartialEq for TimeZoneVariant
Auto Trait Implementations§
impl Freeze for TimeZoneVariant
impl RefUnwindSafe for TimeZoneVariant
impl Send for TimeZoneVariant
impl Sync for TimeZoneVariant
impl Unpin for TimeZoneVariant
impl UnwindSafe for TimeZoneVariant
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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