pub enum DateTimeFilterPast {
Show 18 variants
ExactMatch(OffsetDateTime),
Range(OffsetDateTime, OffsetDateTime),
LessThanOrEqual(OffsetDateTime),
GreaterThanOrEqual(OffsetDateTime),
LessThanDaysAgo(u32),
MoreThanDaysAgo(u32),
WithinPastDays(u32),
ExactDaysAgo(u32),
Today,
Yesterday,
ThisWeek,
LastWeek,
LastTwoWeeks,
ThisMonth,
LastMonth,
ThisYear,
Unset,
Any,
}Expand description
Filter for a comparable date time filters for past used for filters on created_on, updated_on fields
Variants§
ExactMatch(OffsetDateTime)
an exact match
Range(OffsetDateTime, OffsetDateTime)
a range match (inclusive)
LessThanOrEqual(OffsetDateTime)
we only want values less than or equal to the parameter
GreaterThanOrEqual(OffsetDateTime)
we only want values greater than or equal to the parameter
LessThanDaysAgo(u32)
less than n days ago
MoreThanDaysAgo(u32)
more than n days ago
WithinPastDays(u32)
within the past n days
ExactDaysAgo(u32)
exactly n days ago
Today
today
Yesterday
yesterday
ThisWeek
this week
LastWeek
last week
LastTwoWeeks
last 2 weeks
ThisMonth
this month
LastMonth
last month
ThisYear
this year
Unset
unset value (NULL in DB)
Any
any value (NOT NULL in DB)
Trait Implementations§
Source§impl Clone for DateTimeFilterPast
impl Clone for DateTimeFilterPast
Source§fn clone(&self) -> DateTimeFilterPast
fn clone(&self) -> DateTimeFilterPast
Returns a duplicate 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 DateTimeFilterPast
impl Debug for DateTimeFilterPast
Auto Trait Implementations§
impl Freeze for DateTimeFilterPast
impl RefUnwindSafe for DateTimeFilterPast
impl Send for DateTimeFilterPast
impl Sync for DateTimeFilterPast
impl Unpin for DateTimeFilterPast
impl UnwindSafe for DateTimeFilterPast
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.