#[non_exhaustive]pub enum Unit<const N: u128 = 1> {
Nanosecond,
Microsecond,
Millisecond,
Second,
Minute,
Hour,
Day,
Week,
}Available on crate feature
cookies only.Expand description
A statically-known multiple of a given unit of time.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Trait Implementations§
impl<const N: u128> Copy for Unit<N>
impl<const N: u128> Eq for Unit<N>
Source§impl<const N: u128> Ord for Unit<N>
impl<const N: u128> Ord for Unit<N>
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<const N: u128> PartialOrd for Unit<N>
impl<const N: u128> PartialOrd for Unit<N>
Source§impl<const N: u128> PartialOrd<Day<N>> for Unit<N>
impl<const N: u128> PartialOrd<Day<N>> for Unit<N>
Source§impl<const N: u128> PartialOrd<Hour<N>> for Unit<N>
impl<const N: u128> PartialOrd<Hour<N>> for Unit<N>
Source§impl<const N: u128> PartialOrd<Microsecond<N>> for Unit<N>
impl<const N: u128> PartialOrd<Microsecond<N>> for Unit<N>
Source§impl<const N: u128> PartialOrd<Millisecond<N>> for Unit<N>
impl<const N: u128> PartialOrd<Millisecond<N>> for Unit<N>
Source§impl<const N: u128> PartialOrd<Minute<N>> for Unit<N>
impl<const N: u128> PartialOrd<Minute<N>> for Unit<N>
Source§impl<const N: u128> PartialOrd<Nanosecond<N>> for Unit<N>
impl<const N: u128> PartialOrd<Nanosecond<N>> for Unit<N>
Source§impl<const N: u128> PartialOrd<Second<N>> for Unit<N>
impl<const N: u128> PartialOrd<Second<N>> for Unit<N>
Source§impl<const N: u128> PartialOrd<Unit<N>> for Nanosecond<N>
impl<const N: u128> PartialOrd<Unit<N>> for Nanosecond<N>
Source§impl<const N: u128> PartialOrd<Unit<N>> for Microsecond<N>
impl<const N: u128> PartialOrd<Unit<N>> for Microsecond<N>
Source§impl<const N: u128> PartialOrd<Unit<N>> for Millisecond<N>
impl<const N: u128> PartialOrd<Unit<N>> for Millisecond<N>
Source§impl<const N: u128> PartialOrd<Unit<N>> for Second<N>
impl<const N: u128> PartialOrd<Unit<N>> for Second<N>
Source§impl<const N: u128> PartialOrd<Unit<N>> for Minute<N>
impl<const N: u128> PartialOrd<Unit<N>> for Minute<N>
Source§impl<const N: u128> PartialOrd<Unit<N>> for Hour<N>
impl<const N: u128> PartialOrd<Unit<N>> for Hour<N>
Source§impl<const N: u128> PartialOrd<Unit<N>> for Day<N>
impl<const N: u128> PartialOrd<Unit<N>> for Day<N>
Source§impl<const N: u128> PartialOrd<Unit<N>> for Week<N>
impl<const N: u128> PartialOrd<Unit<N>> for Week<N>
Source§impl<const N: u128> PartialOrd<Week<N>> for Unit<N>
impl<const N: u128> PartialOrd<Week<N>> for Unit<N>
impl<const N: u128> StructuralPartialEq for Unit<N>
Auto Trait Implementations§
impl<const N: u128> Freeze for Unit<N>
impl<const N: u128> RefUnwindSafe for Unit<N>
impl<const N: u128> Send for Unit<N>
impl<const N: u128> Sync for Unit<N>
impl<const N: u128> Unpin for Unit<N>
impl<const N: u128> UnsafeUnpin for Unit<N>
impl<const N: u128> UnwindSafe for Unit<N>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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
Compare self to
key and return true if they are equal.