Trait Filterable
pub trait Filterable {
// Required method
fn set_filter(&mut self, query: &str);
// Provided methods
fn filter_count(&self) -> Option<FilterCount> { ... }
fn search_scope(&self) -> Option<ScopeDecl> { ... }
}Expand description
A view a SearchField can narrow: a list, a table, a grid of cards.
Required Methods§
fn set_filter(&mut self, query: &str)
fn set_filter(&mut self, query: &str)
Show only what matches query; an empty query shows everything.
Match the way search does (crate::search::ListIndex) so a filter
and the platform search agree on what “matches” means.
Provided Methods§
fn filter_count(&self) -> Option<FilterCount>
fn filter_count(&self) -> Option<FilterCount>
How many rows the current filter leaves, for the field’s counter.
fn search_scope(&self) -> Option<ScopeDecl>
fn search_scope(&self) -> Option<ScopeDecl>
The part of the app the view shows, which “Search everywhere”
narrows the platform search to. None searches the whole app.