Trait Queryable
pub trait Queryable {
// Required methods
fn set_query_text(&mut self, text: &str);
fn query_closed(&mut self);
// Provided methods
fn query_opened(&mut self) { ... }
fn enter_results(&mut self) { ... }
fn query_count(&self) -> Option<FilterCount> { ... }
}Expand description
An app whose views are queries over its resources: the window’s search turns the view shown into a query view, and closing it returns to the view before.
Required Methods§
fn set_query_text(&mut self, text: &str)
fn set_query_text(&mut self, text: &str)
What is typed is now text (empty when nothing is yet).
fn query_closed(&mut self)
fn query_closed(&mut self)
The search closed: show the view from before it opened, as it was.
Provided Methods§
fn query_opened(&mut self)
fn query_opened(&mut self)
The search opened on the window: the person focused the field and may type next (an app warms its remote sources here).
fn enter_results(&mut self)
fn enter_results(&mut self)
Enter or Down in the field: the keyboard goes to the results.
fn query_count(&self) -> Option<FilterCount>
fn query_count(&self) -> Option<FilterCount>
What the field’s counter shows, if anything.