#[non_exhaustive]pub enum StoreError {
Sqlite(Error),
Io(Error),
Json(Error),
SchemaMismatch {
found: String,
expected: &'static str,
},
MissingMetadata(String),
Corrupt(&'static str),
Closed,
}Expand description
An error from building or opening a persisted corpus.
The Corpus read methods are
infallible by trait contract — a Store validates its schema and metadata at
Store::open, so subsequent reads degrade to empty results rather than
surfacing an error. This type covers only the fallible build and open steps.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Sqlite(Error)
A SQLite operation failed.
Io(Error)
A filesystem operation failed.
Json(Error)
A feature row could not be serialized to JSON.
SchemaMismatch
The opened store’s schema version is not the one this build understands.
Fields
MissingMetadata(String)
A required metadata fact was absent from the opened store.
Corrupt(&'static str)
A stored metadata value was present but unparseable.
Closed
The builder was used after it had already been published.
Trait Implementations§
Source§impl Debug for StoreError
impl Debug for StoreError
Source§impl Display for StoreError
impl Display for StoreError
Source§impl Error for StoreError
impl Error for StoreError
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<Error> for StoreError
impl From<Error> for StoreError
Source§impl From<Error> for StoreError
impl From<Error> for StoreError
Auto Trait Implementations§
impl !RefUnwindSafe for StoreError
impl !UnwindSafe for StoreError
impl Freeze for StoreError
impl Send for StoreError
impl Sync for StoreError
impl Unpin for StoreError
impl UnsafeUnpin for StoreError
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