pub struct SemanticSearchEngine { /* private fields */ }Implementations§
Source§impl SemanticSearchEngine
impl SemanticSearchEngine
pub fn new(config: SearchEngineConfig) -> SemanticSearchEngine
pub fn build_index( &mut self, traits: &[TraitInfo], types: &[TypeInfo], examples: &[CodeExample], ) -> Result<(), Box<dyn Error>>
pub fn search( &mut self, query: &SearchQuery, ) -> Result<Vec<SearchResult>, Box<dyn Error>>
pub fn get_autocomplete_suggestions( &self, prefix: &str, limit: usize, ) -> Vec<AutocompleteSuggestion>
pub fn get_search_metrics(&self) -> &SearchMetrics
Auto Trait Implementations§
impl Freeze for SemanticSearchEngine
impl RefUnwindSafe for SemanticSearchEngine
impl Send for SemanticSearchEngine
impl Sync for SemanticSearchEngine
impl Unpin for SemanticSearchEngine
impl UnwindSafe for SemanticSearchEngine
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> 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