[][src]Enum tinydb::error::DatabaseError

pub enum DatabaseError {
    ItemNotFound,
    DupeFound,
    SavePathRequired,
    IOError(Error),
    DatabaseNotFound,
    BadDbName,
}

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

impl Debug for DatabaseError[src]

impl From<Error> for DatabaseError[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.