pub enum Backend {
Sqlite(SqliteBackend),
}Expand description
Runtime backend dispatcher.
Wraps SqliteBackend and delegates Backend trait methods.
Variants§
Sqlite(SqliteBackend)
SQLite storage backend (traditional, always available)
Implementations§
Source§impl Backend
impl Backend
Sourcepub fn detect_and_open(db_path: &Path) -> Result<Self, LlmError>
pub fn detect_and_open(db_path: &Path) -> Result<Self, LlmError>
Sourcepub fn search_symbols(
&self,
options: SearchOptions<'_>,
) -> Result<(SearchResponse, bool, bool), LlmError>
pub fn search_symbols( &self, options: SearchOptions<'_>, ) -> Result<(SearchResponse, bool, bool), LlmError>
Delegate search_symbols to inner backend.
Sourcepub fn search_references(
&self,
options: SearchOptions<'_>,
) -> Result<(ReferenceSearchResponse, bool), LlmError>
pub fn search_references( &self, options: SearchOptions<'_>, ) -> Result<(ReferenceSearchResponse, bool), LlmError>
Delegate search_references to inner backend.
Sourcepub fn search_calls(
&self,
options: SearchOptions<'_>,
) -> Result<(CallSearchResponse, bool), LlmError>
pub fn search_calls( &self, options: SearchOptions<'_>, ) -> Result<(CallSearchResponse, bool), LlmError>
Delegate search_calls to inner backend.
Sourcepub fn search_implements(
&self,
options: SearchOptions<'_>,
) -> Result<(ImplementsSearchResponse, bool), LlmError>
pub fn search_implements( &self, options: SearchOptions<'_>, ) -> Result<(ImplementsSearchResponse, bool), LlmError>
Delegate search_implements to inner backend.
pub fn search_docs( &self, options: DocsSearchOptions<'_>, ) -> Result<DocsSearchResponse, LlmError>
pub fn search_facts( &self, options: FactsSearchOptions<'_>, ) -> Result<FactsSearchResponse, LlmError>
Sourcepub fn ast(
&self,
file: &Path,
position: Option<usize>,
limit: usize,
) -> Result<Value, LlmError>
pub fn ast( &self, file: &Path, position: Option<usize>, limit: usize, ) -> Result<Value, LlmError>
Delegate ast to inner backend.
Sourcepub fn find_ast(&self, kind: &str) -> Result<Value, LlmError>
pub fn find_ast(&self, kind: &str) -> Result<Value, LlmError>
Delegate find_ast to inner backend.
Sourcepub fn complete(
&self,
prefix: &str,
limit: usize,
) -> Result<Vec<String>, LlmError>
pub fn complete( &self, prefix: &str, limit: usize, ) -> Result<Vec<String>, LlmError>
Get FQN completions for a prefix.
Sourcepub fn lookup(&self, fqn: &str, db_path: &str) -> Result<SymbolMatch, LlmError>
pub fn lookup(&self, fqn: &str, db_path: &str) -> Result<SymbolMatch, LlmError>
Lookup symbol by exact FQN.
Sourcepub fn search_by_label(
&self,
label: &str,
limit: usize,
db_path: &str,
) -> Result<(SearchResponse, bool, bool), LlmError>
pub fn search_by_label( &self, label: &str, limit: usize, db_path: &str, ) -> Result<(SearchResponse, bool, bool), LlmError>
Search for symbols by label.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Backend
impl !RefUnwindSafe for Backend
impl !Sync for Backend
impl !UnwindSafe for Backend
impl Send for Backend
impl Unpin for Backend
impl UnsafeUnpin for Backend
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> 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