pub enum LetheError {
Show 16 variants
Database {
message: String,
},
Embedding {
message: String,
},
Config {
message: String,
},
Validation {
field: String,
reason: String,
},
Io(Error),
JsonSerialization(Error),
YamlSerialization(Error),
Timeout {
operation: String,
timeout_ms: u64,
},
NotFound {
resource_type: String,
id: String,
},
Authentication {
message: String,
},
Authorization {
message: String,
},
ExternalService {
service: String,
message: String,
},
Pipeline {
stage: String,
message: String,
},
Vector {
message: String,
},
MathOptimization {
message: String,
},
Internal {
message: String,
},
}Expand description
Main error type for the Lethe system
Variants§
Database
Database-related errors
Embedding
Embedding service errors
Config
Configuration errors
Validation
Validation errors
Io(Error)
IO errors
JsonSerialization(Error)
JSON Serialization errors
YamlSerialization(Error)
YAML Serialization errors
Timeout
Timeout errors
NotFound
Resource not found
Authentication
Authentication errors
Authorization
Authorization errors
ExternalService
External service errors
Pipeline
Processing pipeline errors
Vector
Vector operations errors
MathOptimization
Mathematical optimization errors
Internal
Generic internal errors
Implementations§
Source§impl LetheError
impl LetheError
Sourcepub fn validation(field: impl Into<String>, reason: impl Into<String>) -> Self
pub fn validation(field: impl Into<String>, reason: impl Into<String>) -> Self
Create a validation error
Sourcepub fn not_found(
resource_type: impl Into<String>,
id: impl Into<String>,
) -> Self
pub fn not_found( resource_type: impl Into<String>, id: impl Into<String>, ) -> Self
Create a not found error
Sourcepub fn external_service(
service: impl Into<String>,
message: impl Into<String>,
) -> Self
pub fn external_service( service: impl Into<String>, message: impl Into<String>, ) -> Self
Create an external service error
Trait Implementations§
Source§impl Debug for LetheError
impl Debug for LetheError
Source§impl Display for LetheError
impl Display for LetheError
Source§impl Error for LetheError
impl Error for LetheError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<Error> for LetheError
impl From<Error> for LetheError
Source§impl From<Error> for LetheError
impl From<Error> for LetheError
Source§impl From<Error> for LetheError
impl From<Error> for LetheError
Source§impl From<ValidationErrors> for LetheError
impl From<ValidationErrors> for LetheError
Source§fn from(err: ValidationErrors) -> Self
fn from(err: ValidationErrors) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for LetheError
impl !RefUnwindSafe for LetheError
impl Send for LetheError
impl Sync for LetheError
impl Unpin for LetheError
impl !UnwindSafe for LetheError
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