pub struct SchemaRecommender { /* private fields */ }Expand description
Schema recommendation engine.
Implementations§
Source§impl SchemaRecommender
impl SchemaRecommender
Sourcepub fn add_schema(&mut self, id: impl Into<String>, schema: SymbolTable)
pub fn add_schema(&mut self, id: impl Into<String>, schema: SymbolTable)
Add a schema to the recommendation pool.
Sourcepub fn remove_schema(&mut self, id: &str) -> Option<SymbolTable>
pub fn remove_schema(&mut self, id: &str) -> Option<SymbolTable>
Remove a schema from the pool.
Sourcepub fn record_usage(&mut self, schema_id: &str)
pub fn record_usage(&mut self, schema_id: &str)
Record schema usage for collaborative filtering.
Sourcepub fn recommend(
&self,
query: &SymbolTable,
strategy: RecommendationStrategy,
limit: usize,
) -> Result<Vec<SchemaScore>>
pub fn recommend( &self, query: &SymbolTable, strategy: RecommendationStrategy, limit: usize, ) -> Result<Vec<SchemaScore>>
Get recommendations for a query schema.
Sourcepub fn recommend_with_context(
&self,
query: &SymbolTable,
context: &RecommendationContext,
limit: usize,
) -> Result<Vec<SchemaScore>>
pub fn recommend_with_context( &self, query: &SymbolTable, context: &RecommendationContext, limit: usize, ) -> Result<Vec<SchemaScore>>
Get recommendations with context.
Sourcepub fn stats(&self) -> RecommenderStats
pub fn stats(&self) -> RecommenderStats
Get statistics about the recommendation pool.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SchemaRecommender
impl RefUnwindSafe for SchemaRecommender
impl Send for SchemaRecommender
impl Sync for SchemaRecommender
impl Unpin for SchemaRecommender
impl UnwindSafe for SchemaRecommender
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