pub enum IsLeapSec {
None,
Add,
Sub,
}Expand description
Indicates whether a queried instant falls exactly on a leap second transition.
This is returned by LeapInfo::is_leap_sec and is only ever set to a
non-None value when the queried timestamp is exactly at the moment
a leap second is inserted or removed.
IsLeapSec::Addis returned for the inserted leap second (e.g.23:59:60).IsLeapSec::Subis returned for a negative (subtracted) leap second.IsLeapSec::Noneis returned for all normal seconds.
Variants§
None
This instant is not a leap second.
Add
This instant is a positive leap second (a second is being inserted).
Example: 2015-06-30 23:59:60 UTC.
Sub
This instant is a negative leap second (a second is being removed).
Perhaps this would work by having clocks skip the 59th second of a
minute, e.g. 2015-06-30 23:59:58 UTC → 2015-07-01 00:00:00 UTC.
Trait Implementations§
impl Copy for IsLeapSec
impl Eq for IsLeapSec
impl StructuralPartialEq for IsLeapSec
Auto Trait Implementations§
impl Freeze for IsLeapSec
impl RefUnwindSafe for IsLeapSec
impl Send for IsLeapSec
impl Sync for IsLeapSec
impl Unpin for IsLeapSec
impl UnsafeUnpin for IsLeapSec
impl UnwindSafe for IsLeapSec
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§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
Compare self to
key and return true if they are equal.