#[non_exhaustive]pub enum DateValue {
Specific(NaiveDate),
Today,
Yesterday,
ThisWeek,
ThisMonth,
Relative {
amount: u32,
unit: RelativeUnit,
},
}Expand description
Date value for QueryNode::DateRange.
The parser does not resolve Relative against a concrete now —
that’s deliberate. A query parsed today and serialised back via
Display must mean the same thing tomorrow.
Backends resolve Relative against
ParserOptions::now_provider when building
an executable query.
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.
Specific(NaiveDate)
Today
Yesterday
ThisWeek
ThisMonth
Relative
older_than:5d, newer_than:2w, etc. — a duration relative to
“now”. Resolution happens at query-execution time.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for DateValue
impl<'de> Deserialize<'de> for DateValue
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
impl Eq for DateValue
impl StructuralPartialEq for DateValue
Auto Trait Implementations§
impl Freeze for DateValue
impl RefUnwindSafe for DateValue
impl Send for DateValue
impl Sync for DateValue
impl Unpin for DateValue
impl UnsafeUnpin for DateValue
impl UnwindSafe for DateValue
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