pub struct SearchProvider {
sender: UnboundedSender<SearchProviderAction>,
}
Fields§
§sender: UnboundedSender<SearchProviderAction>
Implementations§
Source§impl SearchProvider
impl SearchProvider
pub fn new() -> (Self, Receiver<SearchProviderAction>)
Trait Implementations§
Source§impl SearchProviderImpl for SearchProvider
impl SearchProviderImpl for SearchProvider
Source§fn activate_result(
&self,
identifier: ResultID,
_terms: &[String],
_timestamp: u32,
)
fn activate_result( &self, identifier: ResultID, _terms: &[String], _timestamp: u32, )
The method is called when a user clicks on an individual search result
to open it in the application. Read more
Source§fn launch_search(&self, terms: &[String], _timestamp: u32)
fn launch_search(&self, terms: &[String], _timestamp: u32)
The method is called when a user clicks on the provider icon to
display more search results in the application. Read more
Source§fn initial_result_set(&self, terms: &[String]) -> Vec<ResultID>
fn initial_result_set(&self, terms: &[String]) -> Vec<ResultID>
The method is called when a new search is started. Read more
Source§fn result_metas(&self, identifiers: &[ResultID]) -> Vec<ResultMeta>
fn result_metas(&self, identifiers: &[ResultID]) -> Vec<ResultMeta>
The method is called to obtain detailed information of the results. Read more
Auto Trait Implementations§
impl Freeze for SearchProvider
impl !RefUnwindSafe for SearchProvider
impl Send for SearchProvider
impl Sync for SearchProvider
impl Unpin for SearchProvider
impl !UnwindSafe for SearchProvider
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more