Public declaration syntax from forge-rs/crates/forge-coder/src/code_search.rs Original source SHA-256: 4de8512214fab2ea5d87de8d2d1e82db7055c53036c6a05d0349f2c680447c6e Function bodies and constant values are omitted. This is not the complete implementation. Source line 48 #[derive(Debug, Clone, Serialize, Deserialize)] pub enum SearchScope { /// Search all files in the repository. AllFiles, /// Search only files with the given extensions. Extensions(Vec), /// Search only within specific directories. Directories(Vec), /// Search a specific file. SingleFile(PathBuf), } Source line 61 #[derive(Debug, Clone, Serialize, Deserialize)] pub struct SearchQuery { /// The search pattern (literal string or regex). pub pattern: String, /// The scope to search within. pub scope: SearchScope, /// Maximum number of results to return. pub max_results: usize, /// Whether the search is case-sensitive. pub case_sensitive: bool } Source line 74 #[derive(Debug, Clone, Serialize, Deserialize)] pub struct SearchResult { /// The file path where the match was found. pub path: PathBuf, /// The 1-indexed line number of the match. pub line_number: usize, /// The content of the matching line. pub line_content: String, /// Optional column offset of the match within the line. pub column: Option } Source line 87 #[derive(Debug, Clone, Serialize, Deserialize)] pub struct SymbolDefinition { /// The symbol name. pub name: String, /// The kind of symbol (function, struct, enum, trait, etc.). pub kind: SymbolKind, /// The file where the symbol is defined. pub file: PathBuf, /// The line number of the definition. pub line: usize, /// The full line of the definition. pub definition_line: String } Source line 102 #[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] pub enum SymbolKind { /// A function or method. Function, /// A struct or class. Struct, /// An enum or enum variant. Enum, /// A trait or interface. Trait, /// A type alias. TypeAlias, /// A constant. Constant, /// A module or namespace. Module, /// A macro. Macro, /// An import or use statement. Import, /// Unknown symbol kind. Unknown, } Source line 146 pub struct CodeSearchEngine { } Source line 156 pub fn new(root: &Path) -> Self; Source line 175 pub async fn search(&self, query: SearchQuery) -> ForgeCoderResult>; Source line 200 pub async fn find_symbol(&self, symbol_name: &str) -> ForgeCoderResult>; Source line 244 pub async fn read_lines( &self, path: &Path, start_line: usize, end_line: usize, ) -> ForgeCoderResult>;