pub struct HeuristicsEngine { /* private fields */ }Expand description
@acp:summary “Aggregates heuristic suggestions from multiple sources” @acp:lock normal
Implementations§
Source§impl HeuristicsEngine
impl HeuristicsEngine
Sourcepub fn with_summary_generation(self, enabled: bool) -> Self
pub fn with_summary_generation(self, enabled: bool) -> Self
@acp:summary “Enables or disables summary generation”
Sourcepub fn with_git_heuristics(self, enabled: bool) -> Self
pub fn with_git_heuristics(self, enabled: bool) -> Self
@acp:summary “Enables or disables git-based heuristics”
Sourcepub fn suggest(
&self,
target: &str,
line: usize,
symbol_kind: Option<SymbolKind>,
file_path: &str,
) -> Vec<Suggestion>
pub fn suggest( &self, target: &str, line: usize, symbol_kind: Option<SymbolKind>, file_path: &str, ) -> Vec<Suggestion>
@acp:summary “Generates suggestions for a symbol”
Collects suggestions from all heuristic sources:
- Naming patterns (security, data, test keywords)
- Path patterns (directory → domain)
- Visibility patterns (lock levels)
- Summary generation from identifier names
Sourcepub fn suggest_full(
&self,
target: &str,
line: usize,
symbol_kind: Option<SymbolKind>,
file_path: &str,
visibility: Option<Visibility>,
is_exported: bool,
) -> Vec<Suggestion>
pub fn suggest_full( &self, target: &str, line: usize, symbol_kind: Option<SymbolKind>, file_path: &str, visibility: Option<Visibility>, is_exported: bool, ) -> Vec<Suggestion>
@acp:summary “Generates suggestions for a symbol with visibility info”
Full version that includes visibility-based suggestions.
Sourcepub fn suggest_with_git(
&self,
target: &str,
line: usize,
symbol_kind: Option<SymbolKind>,
file_path: &str,
repo: Option<&GitRepository>,
) -> Vec<Suggestion>
pub fn suggest_with_git( &self, target: &str, line: usize, symbol_kind: Option<SymbolKind>, file_path: &str, repo: Option<&GitRepository>, ) -> Vec<Suggestion>
@acp:summary “Generates suggestions including git-based heuristics”
Extended version that also collects git history-based suggestions:
- High churn detection
- Single contributor warnings
- Code stability assessment
Sourcepub fn suggest_with_git_full(
&self,
target: &str,
line: usize,
symbol_kind: Option<SymbolKind>,
file_path: &str,
repo: Option<&GitRepository>,
visibility: Option<Visibility>,
is_exported: bool,
) -> Vec<Suggestion>
pub fn suggest_with_git_full( &self, target: &str, line: usize, symbol_kind: Option<SymbolKind>, file_path: &str, repo: Option<&GitRepository>, visibility: Option<Visibility>, is_exported: bool, ) -> Vec<Suggestion>
@acp:summary “Generates all suggestions including git and visibility”
Full version with all heuristic sources:
- Naming patterns
- Path patterns
- Visibility patterns
- Git history analysis
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HeuristicsEngine
impl RefUnwindSafe for HeuristicsEngine
impl Send for HeuristicsEngine
impl Sync for HeuristicsEngine
impl Unpin for HeuristicsEngine
impl UnwindSafe for HeuristicsEngine
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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