pub enum Error {
Show 13 variants
CompressionUnavailable,
FileLockingUnavailable,
InvalidConfig {
message: &'static str,
},
BadChecksum {
path: String,
},
InvalidFileFormat {
path: String,
message: &'static str,
},
InvalidMetadata {
message: &'static str,
},
InvalidPageData {
page: u64,
message: &'static str,
},
LimitExceeded,
Closed,
Locked,
ReadOnly,
Io(Error),
Other(Box<dyn Error + Send + Sync>),
}
Expand description
Error type returned by database operations.
Variants§
Support for compression is not available due to a disabled feature.
Support for file locking is not available due to a disabled feature.
InvalidConfig
Provided configuration is invalid.
BadChecksum
A calculated checksum does not match.
InvalidFileFormat
A file contained unexpected data or is not a database file.
InvalidMetadata
The metadata file contains invalid data.
InvalidPageData
A page file contains invalid data.
LimitExceeded
An execution or resource limit was exceeded.
This error occurs if the tree is corrupted in such a way that it causes infinite loops.
Closed
Database is closed.
This occurs if the database experienced an error and will refuse to process future operations to prevent further corruption.
Locked
Database is locked.
Another process has locked the database for reading/writing.
ReadOnly
A modification to a database opened in read-only mode was requested.
Io(Error)
Other std IO error.
Other(Box<dyn Error + Send + Sync>)
Other internal errors.