Enum gddb::error::DatabaseError
source · [−]pub enum DatabaseError {
ItemNotFound,
DupeFound,
SavePathRequired,
IOError(Error),
DatabaseNotFound,
BadDbName,
}
Expand description
An error enum for the possible faliure states of the crate::Database structure.
Variants
ItemNotFound
When the item queried for was not found
DupeFound
A duplicate value was found when adding to the database with crate::Database::strict_dupes allowed.
SavePathRequired
When crate::Database::save_path is required but is not found. This commonly happens when loading or dumping a database with crate::Database::save_path being Option::None.
IOError(Error)
Misc std::io::Error that could not be properly handled.
DatabaseNotFound
When the database could not be found. This is typically raised inside of crate::Database::from when it tries to retrieve the path to the database.
BadDbName
When the given database name to an assumption-making function like crate::Database::auto_from does not have a valid file stem or could not convert from an std::ffi::OsString to a String.
Trait Implementations
sourceimpl Debug for DatabaseError
impl Debug for DatabaseError
Auto Trait Implementations
impl RefUnwindSafe for DatabaseError
impl Send for DatabaseError
impl Sync for DatabaseError
impl Unpin for DatabaseError
impl UnwindSafe for DatabaseError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more