pub enum Error {
Show 20 variants
Io(Error),
Storage(String),
SqlParse(String),
QueryExecution(String),
QueryTimeout(String),
QueryCancelled(String),
Transaction(String),
TypeConversion(String),
Config(String),
Encryption(String),
Protocol(String),
VectorIndex(String),
MultiTenant(String),
Audit(String),
Compression(String),
BranchMerge(String),
MergeConflict(String),
ConstraintViolation(String),
LockPoisoned(String),
Generic(String),
}Expand description
Database error type
All errors from HeliosDB Lite operations are represented by this enum. Each variant includes a human-readable message describing the error.
§Creating Errors
Use the constructor methods for creating errors:
use heliosdb_nano::Error;
let err = Error::storage("Table not found: users");
let err = Error::transaction("Deadlock detected");
let err = Error::query_timeout("Query exceeded 30s limit");Variants§
Io(Error)
I/O error
Storage(String)
Storage error
SqlParse(String)
SQL parsing error
QueryExecution(String)
Query execution error
QueryTimeout(String)
Query timeout error
QueryCancelled(String)
Query cancelled error
Transaction(String)
Transaction error
TypeConversion(String)
Type conversion error
Config(String)
Invalid configuration
Encryption(String)
Encryption error
Protocol(String)
Protocol error
VectorIndex(String)
Vector index error
MultiTenant(String)
Multi-tenancy error
Audit(String)
Audit error
Compression(String)
Compression error
BranchMerge(String)
Branch merge error
MergeConflict(String)
Merge conflict error
ConstraintViolation(String)
Constraint violation error (FK, CHECK, UNIQUE)
LockPoisoned(String)
Lock poisoning error (mutex/rwlock poisoned)
Generic(String)
Generic error
Implementations§
Source§impl Error
impl Error
Sourcepub fn query_execution(msg: impl Into<String>) -> Self
pub fn query_execution(msg: impl Into<String>) -> Self
Create a query execution error
Sourcepub fn query_timeout(msg: impl Into<String>) -> Self
pub fn query_timeout(msg: impl Into<String>) -> Self
Create a query timeout error
Sourcepub fn query_cancelled(msg: impl Into<String>) -> Self
pub fn query_cancelled(msg: impl Into<String>) -> Self
Create a query cancelled error
Sourcepub fn transaction(msg: impl Into<String>) -> Self
pub fn transaction(msg: impl Into<String>) -> Self
Create a transaction error
Sourcepub fn type_conversion(msg: impl Into<String>) -> Self
pub fn type_conversion(msg: impl Into<String>) -> Self
Create a type conversion error
Sourcepub fn encryption(msg: impl Into<String>) -> Self
pub fn encryption(msg: impl Into<String>) -> Self
Create an encryption error
Sourcepub fn vector_index(msg: impl Into<String>) -> Self
pub fn vector_index(msg: impl Into<String>) -> Self
Create a vector index error
Sourcepub fn multi_tenant(msg: impl Into<String>) -> Self
pub fn multi_tenant(msg: impl Into<String>) -> Self
Create a multi-tenant error
Sourcepub fn compression(msg: impl Into<String>) -> Self
pub fn compression(msg: impl Into<String>) -> Self
Create a compression error
Sourcepub fn branch_merge(msg: impl Into<String>) -> Self
pub fn branch_merge(msg: impl Into<String>) -> Self
Create a branch merge error
Sourcepub fn merge_conflict(msg: impl Into<String>) -> Self
pub fn merge_conflict(msg: impl Into<String>) -> Self
Create a merge conflict error
Sourcepub fn constraint_violation(msg: impl Into<String>) -> Self
pub fn constraint_violation(msg: impl Into<String>) -> Self
Create a constraint violation error (FK, CHECK, UNIQUE)
Sourcepub fn authentication(msg: impl Into<String>) -> Self
pub fn authentication(msg: impl Into<String>) -> Self
Create an authentication error
Sourcepub fn lock_poisoned(msg: impl Into<String>) -> Self
pub fn lock_poisoned(msg: impl Into<String>) -> Self
Create a lock poisoning error
Sourcepub fn resource_limit(msg: impl Into<String>) -> Self
pub fn resource_limit(msg: impl Into<String>) -> Self
Create a resource limit error
Sourcepub fn switchover(msg: impl Into<String>) -> Self
pub fn switchover(msg: impl Into<String>) -> Self
Create a switchover error
Sourcepub fn replication(msg: impl Into<String>) -> Self
pub fn replication(msg: impl Into<String>) -> Self
Create a replication 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()
Source§impl From<Error> for MySqlError
impl From<Error> for MySqlError
Source§impl From<ParserError> for Error
impl From<ParserError> for Error
Source§fn from(err: ParserError) -> Self
fn from(err: ParserError) -> Self
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.