pub enum PulseDBError {
Storage(StorageError),
Validation(ValidationError),
Config {
reason: String,
},
NotFound(NotFoundError),
Io(Error),
Embedding(String),
Vector(String),
Watch(String),
Internal(String),
}Expand description
Top-level error enum for all PulseDB operations.
This is the only error type returned by public APIs. Use pattern matching to handle specific error cases.
Variants§
Storage(StorageError)
Storage layer error (I/O, corruption, transactions).
Validation(ValidationError)
Input validation error.
Config
Configuration error.
NotFound(NotFoundError)
Requested entity not found.
Io(Error)
General I/O error.
Embedding(String)
Embedding generation/validation error.
Vector(String)
Vector index error (HNSW operations).
Watch(String)
Watch system error (subscription or event delivery).
Internal(String)
Internal error (e.g., async runtime failure, task join error).
Implementations§
Source§impl PulseDBError
impl PulseDBError
Sourcepub fn config(reason: impl Into<String>) -> Self
pub fn config(reason: impl Into<String>) -> Self
Creates a configuration error with the given reason.
Sourcepub fn embedding(msg: impl Into<String>) -> Self
pub fn embedding(msg: impl Into<String>) -> Self
Creates an embedding error with the given message.
Sourcepub fn vector(msg: impl Into<String>) -> Self
pub fn vector(msg: impl Into<String>) -> Self
Creates a vector index error with the given message.
Sourcepub fn watch(msg: impl Into<String>) -> Self
pub fn watch(msg: impl Into<String>) -> Self
Creates a watch system error with the given message.
Sourcepub fn internal(msg: impl Into<String>) -> Self
pub fn internal(msg: impl Into<String>) -> Self
Creates an internal error with the given message.
Sourcepub fn is_not_found(&self) -> bool
pub fn is_not_found(&self) -> bool
Returns true if this is a “not found” error.
Sourcepub fn is_validation(&self) -> bool
pub fn is_validation(&self) -> bool
Returns true if this is a validation error.
Sourcepub fn is_storage(&self) -> bool
pub fn is_storage(&self) -> bool
Returns true if this is a storage error.
Sourcepub fn is_embedding(&self) -> bool
pub fn is_embedding(&self) -> bool
Returns true if this is an embedding error.
Sourcepub fn is_internal(&self) -> bool
pub fn is_internal(&self) -> bool
Returns true if this is an internal error.
Trait Implementations§
Source§impl Debug for PulseDBError
impl Debug for PulseDBError
Source§impl Display for PulseDBError
impl Display for PulseDBError
Source§impl Error for PulseDBError
impl Error for PulseDBError
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<CommitError> for PulseDBError
impl From<CommitError> for PulseDBError
Source§fn from(err: CommitError) -> Self
fn from(err: CommitError) -> Self
Source§impl From<DatabaseError> for PulseDBError
impl From<DatabaseError> for PulseDBError
Source§fn from(err: DatabaseError) -> Self
fn from(err: DatabaseError) -> Self
Source§impl From<Error> for PulseDBError
impl From<Error> for PulseDBError
Source§impl From<Error> for PulseDBError
impl From<Error> for PulseDBError
Source§impl From<NotFoundError> for PulseDBError
impl From<NotFoundError> for PulseDBError
Source§fn from(source: NotFoundError) -> Self
fn from(source: NotFoundError) -> Self
Source§impl From<StorageError> for PulseDBError
impl From<StorageError> for PulseDBError
Source§fn from(source: StorageError) -> Self
fn from(source: StorageError) -> Self
Source§impl From<StorageError> for PulseDBError
impl From<StorageError> for PulseDBError
Source§fn from(err: StorageError) -> Self
fn from(err: StorageError) -> Self
Source§impl From<TableError> for PulseDBError
impl From<TableError> for PulseDBError
Source§fn from(err: TableError) -> Self
fn from(err: TableError) -> Self
Source§impl From<TransactionError> for PulseDBError
impl From<TransactionError> for PulseDBError
Source§fn from(err: TransactionError) -> Self
fn from(err: TransactionError) -> Self
Source§impl From<ValidationError> for PulseDBError
impl From<ValidationError> for PulseDBError
Source§fn from(source: ValidationError) -> Self
fn from(source: ValidationError) -> Self
Auto Trait Implementations§
impl Freeze for PulseDBError
impl !RefUnwindSafe for PulseDBError
impl Send for PulseDBError
impl Sync for PulseDBError
impl Unpin for PulseDBError
impl UnsafeUnpin for PulseDBError
impl !UnwindSafe for PulseDBError
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 more