#[non_exhaustive]pub enum TimeGranularity {
None,
Hours,
Minutes,
Seconds,
Nanoseconds,
}Expand description
The granularity of time represented in a Pattern.
Ordered from least granular to most granular for comparison.
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.
None
No time is in the pattern.
Hours
Smallest time unit = hours.
Minutes
Smallest time unit = minutes.
Seconds
Smallest time unit = seconds.
Nanoseconds
Smallest time unit = Nanoseconds.
Implementations§
Source§impl TimeGranularity
impl TimeGranularity
Trait Implementations§
Source§impl Clone for TimeGranularity
impl Clone for TimeGranularity
Source§fn clone(&self) -> TimeGranularity
fn clone(&self) -> TimeGranularity
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TimeGranularity
impl Debug for TimeGranularity
Source§impl Default for TimeGranularity
impl Default for TimeGranularity
Source§impl<'de> Deserialize<'de> for TimeGranularity
impl<'de> Deserialize<'de> for TimeGranularity
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<PatternItem> for TimeGranularity
impl From<PatternItem> for TimeGranularity
Source§fn from(item: PatternItem) -> Self
fn from(item: PatternItem) -> Self
Retrieves the granularity of time represented by a PatternItem.
If the PatternItem is not time-related, returns None.
Source§impl Ord for TimeGranularity
impl Ord for TimeGranularity
Source§fn cmp(&self, other: &TimeGranularity) -> Ordering
fn cmp(&self, other: &TimeGranularity) -> Ordering
1.21.0 · 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 PartialEq for TimeGranularity
impl PartialEq for TimeGranularity
Source§impl PartialOrd for TimeGranularity
impl PartialOrd for TimeGranularity
Source§impl<'a> Yokeable<'a> for TimeGranularitywhere
Self: Sized,
impl<'a> Yokeable<'a> for TimeGranularitywhere
Self: Sized,
Source§type Output = TimeGranularity
type Output = TimeGranularity
This type MUST be
Self with the 'static replaced with 'a, i.e. Self<'a>Source§fn transform_owned(self) -> Self::Output
fn transform_owned(self) -> Self::Output
Source§impl<'zf> ZeroFrom<'zf, TimeGranularity> for TimeGranularity
impl<'zf> ZeroFrom<'zf, TimeGranularity> for TimeGranularity
impl Copy for TimeGranularity
impl Eq for TimeGranularity
impl StructuralPartialEq for TimeGranularity
Auto Trait Implementations§
impl Freeze for TimeGranularity
impl RefUnwindSafe for TimeGranularity
impl Send for TimeGranularity
impl Sync for TimeGranularity
impl Unpin for TimeGranularity
impl UnwindSafe for TimeGranularity
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<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>
Converts
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>
Converts
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