pub struct SearchEngineHandle { /* private fields */ }
Implementations§
source§impl SearchEngineHandle
impl SearchEngineHandle
sourcepub async fn index(&self, host: &Host, documents: impl Iterator<Item = String>)
pub async fn index(&self, host: &Host, documents: impl Iterator<Item = String>)
This spawns a new task for every request it makes. The requests are processed in parallell - this should return within the longest response duration.
sourcepub async fn index_all(&self, host: &Host)
pub async fn index_all(&self, host: &Host)
Indexes all the pages in host
.
Read this section of an article about how it fetches this.
sourcepub async fn watch(
&self,
host_name: impl Into<String>,
collection: Arc<HostCollection>,
) -> Result<RecommendedWatcher, WatchError>
pub async fn watch( &self, host_name: impl Into<String>, collection: Arc<HostCollection>, ) -> Result<RecommendedWatcher, WatchError>
Watch for changes and rebuild index/cache, only for the resources that changed.
This must be called within a Tokio runtime.
The returned [notify::RecommendedWatcher
] should not be dropped.
When it is dropped, the functionality of this function stops.
Trait Implementations§
source§impl Clone for SearchEngineHandle
impl Clone for SearchEngineHandle
source§fn clone(&self) -> SearchEngineHandle
fn clone(&self) -> SearchEngineHandle
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 moreAuto Trait Implementations§
impl Freeze for SearchEngineHandle
impl !RefUnwindSafe for SearchEngineHandle
impl Send for SearchEngineHandle
impl Sync for SearchEngineHandle
impl Unpin for SearchEngineHandle
impl !UnwindSafe for SearchEngineHandle
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
)