pub enum IntervalField {
Year,
Month,
Day,
Hour,
Minute,
Second,
}Expand description
The six primary datetime fields, smallest last, which is the order a qualifier names them in and the order they are written in.
Variants§
Implementations§
Source§impl IntervalField
impl IntervalField
Sourcepub fn spelled(word: &str) -> Option<IntervalField>
pub fn spelled(word: &str) -> Option<IntervalField>
The field this word names, or None when it names none.
Sourcepub fn rank(self) -> usize
pub fn rank(self) -> usize
Where this field stands among the six, which is what says whether one field may follow another.
Sourcepub fn kind(self) -> DurationKind
pub fn kind(self) -> DurationKind
Which of the two duration kinds this field counts in. The kinds do not mix, so a qualifier naming one field from each is not a qualifier at all.
Trait Implementations§
Source§impl Clone for IntervalField
impl Clone for IntervalField
impl Copy for IntervalField
Source§impl Debug for IntervalField
impl Debug for IntervalField
impl Eq for IntervalField
Source§impl Hash for IntervalField
impl Hash for IntervalField
Source§impl PartialEq for IntervalField
impl PartialEq for IntervalField
impl StructuralPartialEq for IntervalField
Auto Trait Implementations§
impl Forget for IntervalField
impl Freeze for IntervalField
impl Move for IntervalField
impl RefUnwindSafe for IntervalField
impl Send for IntervalField
impl Sync for IntervalField
impl Unpin for IntervalField
impl UnsafeUnpin for IntervalField
impl UnwindSafe for IntervalField
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