Enum rustbreak::BreakError
[−]
pub enum BreakError { Io(Error), Deserialize(()), Serialize(Error), Format(FromUtf8Error), Poison, NotFound, }
The Error type exported by BreakError, usually you only need to check against NotFound, however it might be useful sometimes to get other errors.
Variants
Io(Error)
An error returned when doing file operations, this might happen by opening, closing, locking or flushing
Deserialize(())
This error happens if Bincode cannot deserialize a given file. If you get this error check your database is not corrupt. (This includes non-empty files not created by RustBreak!
Serialize(Error)
This error happens if bincode cannot serialize the given type at runtime
Format(FromUtf8Error)
Error when reading a formatted String
Poison
Poisoned, you can recover from this by running recover_poison
on the database
NotFound
This simply means your key could not be found in the database
Trait Implementations
impl Debug for BreakError
[src]
impl Display for BreakError
impl Error for BreakError
fn description(&self) -> &str
A short description of the error. Read more
fn cause(&self) -> Option<&Error>
The lower-level cause of this error, if any. Read more
impl From<Error> for BreakError
fn from(err: Error) -> BreakError
Performs the conversion.
impl From<()> for BreakError
fn from(err: ()) -> BreakError
Performs the conversion.
impl From<Error> for BreakError
fn from(err: Error) -> BreakError
Performs the conversion.
impl From<FromUtf8Error> for BreakError
fn from(err: FromUtf8Error) -> BreakError
Performs the conversion.
impl<T> From<PoisonError<T>> for BreakError
[src]
fn from(_: PoisonError<T>) -> BreakError
[src]
Performs the conversion.