Enum Dst

pub enum Dst

An enum indicating whether a particular datetime is in daylight saving time (DST) or not.

Variants

No

DST is not in effect. In other words, standard time is in effect.

Yes

DST is in effect.

Implementations

impl Dst

fn is_dst(self) -> bool

Returns true when this value is equal to Dst::Yes.

fn is_std(self) -> bool

Returns true when this value is equal to Dst::No.

std in this context refers to "standard time." That is, it is the offset from UTC used when DST is not in effect.

Trait Implementations

impl Clone for Dst

fn clone(&self) -> Dst

impl Copy for Dst

impl Debug for Dst

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl Eq for Dst

impl From<bool> for Dst

fn from(is_dst: bool) -> Dst

impl Hash for Dst

fn hash<__H: Hasher>(&self, state: &mut __H)

impl Ord for Dst

fn cmp(&self, other: &Dst) -> Ordering

impl PartialEq for Dst

fn eq(&self, other: &Dst) -> bool

impl PartialOrd for Dst

fn partial_cmp(&self, other: &Dst) -> Option<Ordering>

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 UnsafeUnpin for Dst

impl UnwindSafe for Dst

Blanket Implementations

impl<T> Any for Dst where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for Dst where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for Dst where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> CloneToUninit for Dst where T: Clone,

unsafe fn clone_to_uninit(&self, dest: *mut u8)

impl<T> From<T> for Dst

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToOwned for Dst where T: Clone,

type Owned = T;
fn to_owned(&self) -> T
fn clone_into(&self, target: &mut T)

impl<T, U> Into<U> for Dst where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for Dst where U: Into<T>,

type Error = Infallible;
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto<U> for Dst where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>