pub struct LoreGrep { /* private fields */ }
Expand description
Main LoreGrep API - the primary interface for code analysis
Quick Start Options:
LoreGrep::auto_discover()
- Zero-configuration setup with automatic project detectionLoreGrep::builder()
- Full control with enhanced builder patternLoreGrep::rust_project()
- Rust-optimized presetLoreGrep::python_project()
- Python-optimized presetLoreGrep::polyglot_project()
- Multi-language preset The main struct for interacting with LoreGrep
Implementations§
Source§impl LoreGrep
impl LoreGrep
Sourcepub fn builder() -> LoreGrepBuilder
pub fn builder() -> LoreGrepBuilder
Create a new builder for configuring LoreGrep
Sourcepub fn auto_discover<P: AsRef<Path>>(path: P) -> Result<Self>
pub fn auto_discover<P: AsRef<Path>>(path: P) -> Result<Self>
Automatically detect project type and configure appropriate analyzers
Sourcepub fn rust_project<P: AsRef<Path>>(_path: P) -> Result<Self>
pub fn rust_project<P: AsRef<Path>>(_path: P) -> Result<Self>
Preset for Rust projects (Cargo projects)
Sourcepub fn python_project<P: AsRef<Path>>(_path: P) -> Result<Self>
pub fn python_project<P: AsRef<Path>>(_path: P) -> Result<Self>
Preset for Python projects
Sourcepub fn polyglot_project<P: AsRef<Path>>(_path: P) -> Result<Self>
pub fn polyglot_project<P: AsRef<Path>>(_path: P) -> Result<Self>
Preset for polyglot projects (multiple languages)
Sourcepub async fn scan(&mut self, path: &str) -> Result<ScanResult>
pub async fn scan(&mut self, path: &str) -> Result<ScanResult>
Scan a repository and build the in-memory index This should be called by the host application, not exposed as a tool
Sourcepub fn get_tool_definitions() -> Vec<ToolSchema>
pub fn get_tool_definitions() -> Vec<ToolSchema>
Get tool definitions for adding to LLM system prompts Returns JSON Schema compatible tool definitions
Sourcepub async fn execute_tool(
&self,
name: &str,
params: Value,
) -> Result<ToolResult>
pub async fn execute_tool( &self, name: &str, params: Value, ) -> Result<ToolResult>
Execute a tool call from the LLM Takes tool name and parameters, returns JSON result
Sourcepub fn is_scanned(&self) -> bool
pub fn is_scanned(&self) -> bool
Check if repository has been scanned
Sourcepub fn get_stats(&self) -> Result<ScanResult>
pub fn get_stats(&self) -> Result<ScanResult>
Get repository statistics
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LoreGrep
impl RefUnwindSafe for LoreGrep
impl Unpin for LoreGrep
impl UnwindSafe for LoreGrep
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