Trait Provider
pub trait Provider<Host, Row>where
Row: SearchRow,{
// Required methods
fn id(&self) -> &str;
fn resource_kinds(&self) -> &[ResourceKind];
fn query_page(
&self,
host: &Host,
query: &Query<'_>,
cursor: Option<&SearchCursor>,
budget: SearchBudget,
) -> SearchPage<Row>;
fn resolve(&self, host: &Host, id: &str, query: &Query<'_>) -> Option<Row>;
// Provided methods
fn max_score(&self) -> i32 { ... }
fn narrows_to_active_app(&self) -> bool { ... }
fn revision(&self, _host: &Host, _query: &Query<'_>) -> String { ... }
}Expand description
Typed fanout boundary. The host supplies retained providers and activation payloads.
Required Methods§
fn id(&self) -> &str
fn resource_kinds(&self) -> &[ResourceKind]
fn query_page( &self, host: &Host, query: &Query<'_>, cursor: Option<&SearchCursor>, budget: SearchBudget, ) -> SearchPage<Row>
fn resolve(&self, host: &Host, id: &str, query: &Query<'_>) -> Option<Row>
Provided Methods§
fn max_score(&self) -> i32
fn narrows_to_active_app(&self) -> bool
fn narrows_to_active_app(&self) -> bool
Whether this provider keeps to the focused app under a
Scope::InApp search, answering only with that app’s own rows.
A search scoped to an app shows that app and nothing else: system
actions and other apps come back only when the scope is cleared.