pub enum Dst {
No,
Yes,
}
Expand description
An enum indicating whether a particular datetime is in DST or not.
DST stands for “daylight saving time.” It is a label used to apply to points in time as a way to contrast it with “standard time.” DST is usually, but not always, one hour ahead of standard time. When DST takes effect is usually determined by governments, and the rules can vary depending on the location. DST is typically used as a means to maximize “sunlight” time during typical working hours, and as a cost cutting measure by reducing energy consumption. (The effectiveness of DST and whether it is overall worth it is a separate question entirely.)
In general, most users should never need to deal with this type. But it can be occasionally useful in circumstances where callers need to know whether DST is active or not for a particular point in time.
This type has a From<bool>
trait implementation, where the bool is
interpreted as being true
when DST is active.
Variants§
Implementations§
Trait Implementations§
Source§impl Ord for Dst
impl Ord for Dst
Source§impl PartialOrd for Dst
impl PartialOrd for Dst
impl Copy for Dst
impl Eq for Dst
impl StructuralPartialEq for Dst
Auto Trait Implementations§
impl Freeze for Dst
impl RefUnwindSafe for Dst
impl Send for Dst
impl Sync for Dst
impl Unpin for Dst
impl UnwindSafe for Dst
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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