Struct stremio_core::models::local_search::LocalSearch
source · pub struct LocalSearch {
pub current_records: Vec<Searchable>,
pub search_results: Vec<Searchable>,
pub searcher: Option<LocalSearch<Searchable>>,
pub latest_records: Option<Loadable<Vec<Searchable>, EnvError>>,
}
Expand description
Local search functionality for the search engine’s suggestions when typing
Fields§
§current_records: Vec<Searchable>
The Searchable items that will be used for the local search.
search_results: Vec<Searchable>
The results of the search autocompletion
searcher: Option<LocalSearch<Searchable>>
§latest_records: Option<Loadable<Vec<Searchable>, EnvError>>
A loadable resource in order to be able to search for items while a new set of items is being loaded (i.e. refreshed)
Implementations§
source§impl LocalSearch
impl LocalSearch
pub fn new<E: Env + 'static>() -> (Self, Effects)
sourcefn get_searchable_items<E: Env + 'static>(url: &Url) -> Effect
fn get_searchable_items<E: Env + 'static>(url: &Url) -> Effect
fetches the /feed.js
using the given Url
fn index( &self, index_options: IndexOptions, score_threshold: f64, ) -> Searcher<Searchable>
Trait Implementations§
source§impl Clone for LocalSearch
impl Clone for LocalSearch
source§fn clone(&self) -> LocalSearch
fn clone(&self) -> LocalSearch
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for LocalSearch
impl Debug for LocalSearch
source§impl Default for LocalSearch
impl Default for LocalSearch
source§fn default() -> LocalSearch
fn default() -> LocalSearch
Returns the “default value” for a type. Read more
source§impl Serialize for LocalSearch
impl Serialize for LocalSearch
Auto Trait Implementations§
impl Freeze for LocalSearch
impl RefUnwindSafe for LocalSearch
impl Send for LocalSearch
impl Sync for LocalSearch
impl Unpin for LocalSearch
impl UnwindSafe for LocalSearch
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)