pub enum Error {
Show 34 variants
Parse(String),
UnsupportedFormat(String),
InvalidStructure(String),
IndexBuild(String),
IndexNotFound(String),
IndexCorrupted(String),
Retrieval(String),
NoRelevantContent,
SearchTimeout(u64),
Llm(String),
RateLimitExceeded(u64),
QuotaExceeded,
Summarization(String),
SummaryTooLong(usize),
Io(Error),
Workspace(String),
Cache(String),
Serialization(String),
DocumentNotFound(String),
ChecksumMismatch(String),
WorkspaceLocked,
VersionMismatch(String),
Toml(String),
Config(String),
MissingConfig(String),
NodeNotFound(String),
InvalidInput(String),
EmptyInput {
field: String,
},
OutOfRange {
field: String,
min: String,
max: String,
actual: String,
},
Throttle(String),
ConcurrencyLimitExceeded(usize),
Timeout(String),
Other(String),
WithContext {
context: String,
source: Box<Self>,
},
}Expand description
The main error type for vectorless operations.
Variants§
Parse(String)
An error occurred while parsing a document.
UnsupportedFormat(String)
Unsupported document format.
InvalidStructure(String)
Invalid document structure.
IndexBuild(String)
An error occurred while building the index.
IndexNotFound(String)
Index not found.
IndexCorrupted(String)
Index corrupted.
Retrieval(String)
An error occurred during retrieval.
NoRelevantContent
No relevant content found.
SearchTimeout(u64)
Search timeout.
Llm(String)
An error occurred during LLM call.
RateLimitExceeded(u64)
LLM rate limit exceeded.
QuotaExceeded
LLM quota exceeded.
Summarization(String)
An error occurred during summarization.
SummaryTooLong(usize)
Summary too long.
Io(Error)
An error occurred during I/O operations.
Workspace(String)
Workspace error.
Cache(String)
Cache error.
Serialization(String)
Serialization error.
DocumentNotFound(String)
Document not found.
ChecksumMismatch(String)
Checksum mismatch.
WorkspaceLocked
Workspace locked by another process.
VersionMismatch(String)
Format version mismatch.
Toml(String)
TOML parsing error.
Config(String)
Invalid configuration.
MissingConfig(String)
Missing required configuration.
NodeNotFound(String)
The requested node was not found.
InvalidInput(String)
Invalid input.
EmptyInput
Empty input.
OutOfRange
Out of range.
Fields
Throttle(String)
Throttle error.
ConcurrencyLimitExceeded(usize)
Concurrency limit exceeded.
Timeout(String)
Operation timeout.
Other(String)
A generic error with a message.
WithContext
Error with context.
Implementations§
Source§impl Error
impl Error
Sourcepub fn with_context(self, context: impl Into<String>) -> Self
pub fn with_context(self, context: impl Into<String>) -> Self
Create an error with additional context.
Sourcepub fn is_retryable(&self) -> bool
pub fn is_retryable(&self) -> bool
Check if this is a retryable error.
Sourcepub fn is_not_found(&self) -> bool
pub fn is_not_found(&self) -> bool
Check if this is a not found error.
Sourcepub fn is_timeout(&self) -> bool
pub fn is_timeout(&self) -> bool
Check if this is a timeout error.
Sourcepub fn is_config_error(&self) -> bool
pub fn is_config_error(&self) -> bool
Check if this is a configuration error.
Sourcepub fn empty_input(field: impl Into<String>) -> Self
pub fn empty_input(field: impl Into<String>) -> Self
Create an empty input error.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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()
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl !UnwindSafe for Error
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
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> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.