pub enum Error {
Show 17 variants
Io(Error),
InvalidMagic,
ChecksumMismatch,
VersionMismatch,
NotFound,
AlreadyExists,
InvalidArgument(String),
Corruption(String),
OutOfMemory,
Unimplemented,
DecryptionFailed,
WriterBusy,
EncryptionAuthFailed,
WriteWriteConflict {
node_id: u64,
},
NodeHasEdges {
node_id: u64,
},
QueryTimeout,
ReadOnly,
}Expand description
All errors that SparrowDB can return.
Variants§
Io(Error)
InvalidMagic
ChecksumMismatch
VersionMismatch
NotFound
AlreadyExists
InvalidArgument(String)
Corruption(String)
OutOfMemory
Unimplemented
DecryptionFailed
AEAD authentication tag verification failed — wrong key or corrupted ciphertext.
WriterBusy
A write transaction is already active; only one writer is allowed at a time.
EncryptionAuthFailed
AEAD authentication tag rejected on page/WAL decrypt — signals that the database was opened with the wrong encryption key (distinct from a generic checksum error so callers can present a clear “wrong key” message).
WriteWriteConflict
Two concurrent write transactions both modified the same node.
The transaction that committed second is aborted to maintain consistency.
NodeHasEdges
The node has attached edges and cannot be deleted without removing them first.
QueryTimeout
The per-query deadline was exceeded before the query could complete.
Returned by [GraphDb::execute_with_timeout] when the supplied
std::time::Duration expires during scan or traversal.
ReadOnly
A mutation or DDL statement was submitted to a read-only transaction.
[ReadTx::query] only accepts read-only Cypher (MATCH … RETURN).
Use [GraphDb::execute] for CREATE, MERGE, MATCH … SET,
MATCH … DELETE, CHECKPOINT, and OPTIMIZE.
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()