#[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) -> Self
pub const fn from_rearguard_isdst(isdst: bool) -> Self
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_zone_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) -> Self::ULE
fn to_unaligned(self) -> Self::ULE
Source§fn from_unaligned(other: Self::ULE) -> Self
fn from_unaligned(other: Self::ULE) -> Self
Source§impl Bake for TimeZoneVariant
impl Bake for TimeZoneVariant
Source§fn bake(&self, env: &CrateEnv) -> TokenStream
fn bake(&self, env: &CrateEnv) -> TokenStream
Source§impl BakeSize for TimeZoneVariant
impl BakeSize for TimeZoneVariant
Source§fn borrows_size(&self) -> usize
fn borrows_size(&self) -> usize
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<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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<Self>
fn into_option(self) -> Option<Self>
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 Serialize for TimeZoneVariant
impl Serialize 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