Enum grebedb::error::Error[][src]

pub enum Error {
Show 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

CompressionUnavailable

Support for compression is not available due to a disabled feature.

FileLockingUnavailable

Support for file locking is not available due to a disabled feature.

InvalidConfig

Provided configuration is invalid.

Show fields

Fields of InvalidConfig

message: &'static str

Custom message.

BadChecksum

A calculated checksum does not match.

Show fields

Fields of BadChecksum

path: String

Path to file with bad checksum.

InvalidFileFormat

A file contained unexpected data or is not a database file.

Show fields

Fields of InvalidFileFormat

path: String

Path to file.

message: &'static str

Custom message.

InvalidMetadata

The metadata file contains invalid data.

Show fields

Fields of InvalidMetadata

message: &'static str

Custom message.

InvalidPageData

A page file contains invalid data.

Show fields

Fields of InvalidPageData

page: u64

Page ID.

message: &'static str

Custom message

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.

Trait Implementations

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

The lower-level source of this error, if any. Read more

🔬 This is a nightly-only experimental API. (backtrace)

Returns a stack backtrace, if available, of where this error occurred. Read more

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.