pub struct AutoCompleter { /* private fields */ }Expand description
Auto-completion engine for schema construction.
Provides intelligent suggestions for domains, predicates, and variable names based on context and learned patterns.
Implementations§
Source§impl AutoCompleter
impl AutoCompleter
Sourcepub fn with_max_suggestions(self, max: usize) -> Self
pub fn with_max_suggestions(self, max: usize) -> Self
Set maximum number of suggestions.
Sourcepub fn index_table(&mut self, table: &SymbolTable)
pub fn index_table(&mut self, table: &SymbolTable)
Index a symbol table for auto-completion.
Sourcepub fn suggest_domain_names(&self, partial: &str) -> Vec<DomainSuggestion>
pub fn suggest_domain_names(&self, partial: &str) -> Vec<DomainSuggestion>
Suggest domain names based on partial input.
Sourcepub fn suggest_predicates(
&self,
domains: &[String],
partial: &str,
) -> Vec<PredicateSuggestion>
pub fn suggest_predicates( &self, domains: &[String], partial: &str, ) -> Vec<PredicateSuggestion>
Suggest predicates based on domain context.
Sourcepub fn suggest_variable_names(
&self,
domain: &str,
partial: &str,
) -> Vec<VariableSuggestion>
pub fn suggest_variable_names( &self, domain: &str, partial: &str, ) -> Vec<VariableSuggestion>
Suggest variable names based on domain type.
Sourcepub fn suggest_domain_for_predicate_arg(
&self,
predicate_name: &str,
existing_args: &[String],
_position: usize,
) -> Vec<DomainSuggestion>
pub fn suggest_domain_for_predicate_arg( &self, predicate_name: &str, existing_args: &[String], _position: usize, ) -> Vec<DomainSuggestion>
Suggest domain given a predicate pattern.
For example, if a user is defining a predicate “teaches” with args [“Person”, “?”], this suggests likely domains for the second argument.
Sourcepub fn stats(&self) -> AutoCompleterStats
pub fn stats(&self) -> AutoCompleterStats
Get completion statistics.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AutoCompleter
impl RefUnwindSafe for AutoCompleter
impl Send for AutoCompleter
impl Sync for AutoCompleter
impl Unpin for AutoCompleter
impl UnwindSafe for AutoCompleter
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