pub trait SearchEngine:
Send
+ Sync
+ 'static {
// Required methods
fn matching<'a>(
&'a self,
index: &'a SearchIndex,
words: &'a str,
owner: Option<Uuid>,
) -> BoxFuture<'a, Result<Vec<Uuid>>>;
fn put<'a>(
&'a self,
index: &'a SearchIndex,
documents: &'a [Document],
) -> BoxFuture<'a, Result<()>>;
fn remove<'a>(
&'a self,
index: &'a SearchIndex,
ids: &'a [Uuid],
) -> BoxFuture<'a, Result<()>>;
}Required Methods§
Sourcefn matching<'a>(
&'a self,
index: &'a SearchIndex,
words: &'a str,
owner: Option<Uuid>,
) -> BoxFuture<'a, Result<Vec<Uuid>>>
fn matching<'a>( &'a self, index: &'a SearchIndex, words: &'a str, owner: Option<Uuid>, ) -> BoxFuture<'a, Result<Vec<Uuid>>>
Best first; with an owner, only that owner’s.
Sourcefn put<'a>(
&'a self,
index: &'a SearchIndex,
documents: &'a [Document],
) -> BoxFuture<'a, Result<()>>
fn put<'a>( &'a self, index: &'a SearchIndex, documents: &'a [Document], ) -> BoxFuture<'a, Result<()>>
Returns once the engine has taken them, which may be before they are found.
fn remove<'a>( &'a self, index: &'a SearchIndex, ids: &'a [Uuid], ) -> BoxFuture<'a, Result<()>>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".