pub struct DateFilter<M> { /* private fields */ }Expand description
Date filter matching a date or time field by calendar day, or by a range of days; see
FilterDate for the types.
A value names one day, f.<name>=2024-01-15, a timestamp’s in the request’s
time_zone; on a range filter the parts
f.<name>.from and f.<name>.to name the first and the last day of a range, either one
alone leaving it open. A value naming an exact time, such as a jiff::Timestamp’s
2024-01-15T09:30:00Z, or its 2024-01-15T09:30 read in the request’s time zone, matches that
time, or bounds the range at it.
DateFilter::new(lens!(Post.created_at)).range();Implementations§
Trait Implementations§
Source§impl<M> Clone for DateFilter<M>
impl<M> Clone for DateFilter<M>
Source§impl<M> Debug for DateFilter<M>
impl<M> Debug for DateFilter<M>
Source§impl<M> Filter<M> for DateFilter<M>
impl<M> Filter<M> for DateFilter<M>
Source§fn to_expr(&self, cx: &Cx, value: &FilterValue) -> Option<Expr<bool>>
fn to_expr(&self, cx: &Cx, value: &FilterValue) -> Option<Expr<bool>>
One day for a single value, or the range its from and to parts bound; None for both,
another part, a value beside the parts, a range ending before it starts, or a part where
range is off, whose one input does not render it.
Source§fn control<'a>(&self, cx: &'a Cx, input: FilterInput) -> BoxView<'a>
fn control<'a>(&self, cx: &'a Cx, input: FilterInput) -> BoxView<'a>
The bound inputs: a date input for a day, a text input for a bound a date input cannot hold.
Source§fn is_noop_value(&self, _value: &FilterValue) -> bool
fn is_noop_value(&self, _value: &FilterValue) -> bool
value selects no predicate without being invalid.Source§fn load_control<'s, 'a: 's>(
&'s self,
cx: &'a Cx,
input: FilterInput,
) -> ControlFuture<'s, 'a>
fn load_control<'s, 'a: 's>( &'s self, cx: &'a Cx, input: FilterInput, ) -> ControlFuture<'s, 'a>
control.