pub enum DatabaseError {
Lock(DirLockError),
Schema(HaysonSchemaError),
ReadOnly {
dir: PathBuf,
operation: String,
},
FieldInUse {
table: String,
field: String,
records: usize,
},
Catalog(String),
Io(Error),
Log(PathBuf, Error),
Table(String, TableError),
Txn(TxnError),
Cipher(Box<HaysonCipherError>),
}Variants§
Lock(DirLockError)
Schema(HaysonSchemaError)
ReadOnly
The handle was opened readonly and operation needs the writer. Its own variant rather than
a Schema refusal so a binding can tell it apart without reading the message.
FieldInUse
drop_field refused because live records still carry the field. records is how many were
found, which is what a caller weighing force needs.
Catalog(String)
Io(Error)
Log(PathBuf, Error)
An IO failure a caller can only act on knowing which file it was about: io::Error carries
no path, and a readonly open that cannot deliver one log has to name it.
Table(String, TableError)
Txn(TxnError)
Cipher(Box<HaysonCipherError>)
Boxed for the same reason as TableError::Cipher — the open()-time keyring is the only
thing that ever builds one, so nothing else should pay for its size at rest.
Trait Implementations§
Source§impl Debug for DatabaseError
impl Debug for DatabaseError
Source§impl Display for DatabaseError
impl Display for DatabaseError
Source§impl Error for DatabaseError
impl Error for DatabaseError
1.30.0 · 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<DirLockError> for DatabaseError
impl From<DirLockError> for DatabaseError
Source§fn from(value: DirLockError) -> Self
fn from(value: DirLockError) -> Self
Converts to this type from the input type.
Source§impl From<Error> for DatabaseError
impl From<Error> for DatabaseError
Source§impl From<HaysonCipherError> for DatabaseError
impl From<HaysonCipherError> for DatabaseError
Source§fn from(value: HaysonCipherError) -> Self
fn from(value: HaysonCipherError) -> Self
Converts to this type from the input type.
Source§impl From<HaysonSchemaError> for DatabaseError
impl From<HaysonSchemaError> for DatabaseError
Source§fn from(value: HaysonSchemaError) -> Self
fn from(value: HaysonSchemaError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for DatabaseError
impl !UnwindSafe for DatabaseError
impl Freeze for DatabaseError
impl Send for DatabaseError
impl Sync for DatabaseError
impl Unpin for DatabaseError
impl UnsafeUnpin for DatabaseError
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