pub enum SentinelError {
Show 13 variants
Io {
source: Error,
},
Json {
source: Error,
},
DocumentNotFound {
id: String,
collection: String,
},
CollectionNotFound {
name: String,
},
DocumentAlreadyExists {
id: String,
collection: String,
},
InvalidDocumentId {
id: String,
},
InvalidCollectionName {
name: String,
},
StoreCorruption {
reason: String,
},
TransactionFailed {
reason: String,
},
LockFailed {
reason: String,
},
CryptoFailed {
operation: String,
},
ConfigError {
message: String,
},
Internal {
message: String,
},
}Expand description
Sentinel-wide error type for the document DBMS.
This error type encompasses all possible errors that can occur within the Sentinel system, providing structured error handling and meaningful error messages for different failure scenarios.
Variants§
Io
I/O operations failed (file system, network, etc.)
Json
JSON serialization/deserialization failed
DocumentNotFound
Document not found in collection
CollectionNotFound
Collection not found in store
DocumentAlreadyExists
Document already exists (for operations that require uniqueness)
InvalidDocumentId
Invalid document ID format
InvalidCollectionName
Invalid collection name format
StoreCorruption
Store is corrupted or in an invalid state
TransactionFailed
Transaction failed
LockFailed
Lock acquisition failed
CryptoFailed
Encryption/decryption operation failed
ConfigError
Configuration error
Internal
Generic error for unexpected conditions
Trait Implementations§
Source§impl Debug for SentinelError
impl Debug for SentinelError
Source§impl Display for SentinelError
impl Display for SentinelError
Source§impl Error for SentinelError
impl Error for SentinelError
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<CryptoError> for SentinelError
impl From<CryptoError> for SentinelError
Source§fn from(err: CryptoError) -> Self
fn from(err: CryptoError) -> Self
Converts to this type from the input type.
Source§impl From<Error> for SentinelError
impl From<Error> for SentinelError
Auto Trait Implementations§
impl Freeze for SentinelError
impl !RefUnwindSafe for SentinelError
impl Send for SentinelError
impl Sync for SentinelError
impl Unpin for SentinelError
impl !UnwindSafe for SentinelError
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