pub struct PresenceFilter<M> { /* private fields */ }Expand description
Presence filter matching an Option field by whether it holds a value: f.<name>=set or
f.<name>=empty.
Over an optional foreign key it lists the records with or without a related record, such as the posts with no author, without naming any related record.
PresenceFilter::new(lens!(Post.cover)).labels("With a cover", "Without a cover");Implementations§
Trait Implementations§
Source§impl<M> Clone for PresenceFilter<M>
impl<M> Clone for PresenceFilter<M>
Source§impl<M> Debug for PresenceFilter<M>
impl<M> Debug for PresenceFilter<M>
Source§impl<M> Filter<M> for PresenceFilter<M>
impl<M> Filter<M> for PresenceFilter<M>
Source§fn to_expr(&self, _cx: &Cx, value: &FilterValue) -> Option<Expr<bool>>
fn to_expr(&self, _cx: &Cx, value: &FilterValue) -> Option<Expr<bool>>
The predicate
value selects for the request cx, or None when it selects none. The
table warns about a value that selects none unless is_noop_value
accepts 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 control in the table’s filter menu.
Source§fn is_noop_value(&self, _value: &FilterValue) -> bool
fn is_noop_value(&self, _value: &FilterValue) -> bool
Whether
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>
The control in the filter menu once what it offers has loaded, such as rows a query
returns. The filter menu renders this one; it defaults to
control.impl<M> IntoFilters<M> for PresenceFilter<M>
Auto Trait Implementations§
impl<M> !RefUnwindSafe for PresenceFilter<M>
impl<M> !UnwindSafe for PresenceFilter<M>
impl<M> Freeze for PresenceFilter<M>
impl<M> Send for PresenceFilter<M>
impl<M> Sync for PresenceFilter<M>
impl<M> Unpin for PresenceFilter<M>
impl<M> UnsafeUnpin for PresenceFilter<M>
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