#[non_exhaustive]pub enum IndexError {
Io(Error),
Sqlite(SqlxError),
VectorStore(VectorStoreError),
Llm(LlmError),
Json(Error),
Parse(String),
UnsupportedLanguage,
Watcher(Error),
IntConversion(TryFromIntError),
EmbedTimeout(u64),
Other(String),
}Expand description
Errors that can occur during code indexing operations.
§Examples
use zeph_index::error::{IndexError, Result};
fn must_succeed() -> Result<()> {
Err(IndexError::UnsupportedLanguage)
}
assert!(matches!(must_succeed(), Err(IndexError::UnsupportedLanguage)));Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Io(Error)
I/O error reading source files from disk.
Raised when tokio::fs::read_to_string or std::fs::read_to_string fail,
for example because a file was deleted between discovery and indexing.
Sqlite(SqlxError)
SQLite database error from sqlx.
Raised by metadata reads/writes in crate::store::CodeStore.
VectorStore(VectorStoreError)
Qdrant vector store error.
Raised by upsert, search, or collection management operations in
crate::store::CodeStore.
Llm(LlmError)
LLM provider error during embedding.
Raised when the configured embedding provider returns an error, for example due to a network timeout or an unsupported model name.
Json(Error)
JSON serialization or deserialization error.
Raised when Qdrant payload values cannot be serialized or when point payloads contain unexpected types.
Parse(String)
Tree-sitter parsing error.
Raised when a grammar is unavailable for a language, or when tree-sitter fails to produce a parse tree (rare — tree-sitter is error-tolerant).
The inner String contains a human-readable description of the failure.
UnsupportedLanguage
Unsupported or unrecognized language.
Raised by crate::indexer when a file has a recognized extension but no
corresponding tree-sitter grammar is available for it.
Watcher(Error)
Filesystem watcher initialization error.
Raised by crate::watcher::IndexWatcher::start when the underlying
notify watcher cannot be created or the root path cannot be watched.
IntConversion(TryFromIntError)
Integer conversion error when mapping usize values to i64 or u64.
Raised when line numbers or chunk counts overflow the target integer type, which in practice only occurs on pathological inputs.
EmbedTimeout(u64)
Embedding call timed out.
Raised by crate::retriever::CodeRetriever and
crate::indexer::CodeIndexer when provider.embed() does not complete
within the configured timeout.
Other(String)
Generic catch-all error for cases that do not fit the variants above.
Used internally for errors like a panicking background thread (e.g., the
directory walk spawn_blocking task).
Trait Implementations§
Source§impl Debug for IndexError
impl Debug for IndexError
Source§impl Display for IndexError
impl Display for IndexError
Source§impl Error for IndexError
impl Error for IndexError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<Error> for IndexError
impl From<Error> for IndexError
Source§impl From<Error> for IndexError
impl From<Error> for IndexError
Source§impl From<Error> for IndexError
impl From<Error> for IndexError
Source§impl From<Error> for IndexError
impl From<Error> for IndexError
Source§impl From<LlmError> for IndexError
impl From<LlmError> for IndexError
Source§impl From<TryFromIntError> for IndexError
impl From<TryFromIntError> for IndexError
Source§fn from(source: TryFromIntError) -> Self
fn from(source: TryFromIntError) -> Self
Source§impl From<VectorStoreError> for IndexError
impl From<VectorStoreError> for IndexError
Source§fn from(source: VectorStoreError) -> Self
fn from(source: VectorStoreError) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for IndexError
impl !UnwindSafe for IndexError
impl Freeze for IndexError
impl Send for IndexError
impl Sync for IndexError
impl Unpin for IndexError
impl UnsafeUnpin for IndexError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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>
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>
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request