use thiserror::Error;
#[derive(Debug, Error)]
pub enum KoitError {
#[error("the database failed to serialize")]
ToFormat(#[source] Box<dyn std::error::Error + Send + Sync + 'static>),
#[error("the database failed to deserialize")]
FromFormat(#[source] Box<dyn std::error::Error + Send + Sync + 'static>),
#[error("failed to read from the backend")]
BackendRead(#[source] Box<dyn std::error::Error + Send + Sync + 'static>),
#[error("failed to write to the backend")]
BackendWrite(#[source] Box<dyn std::error::Error + Send + Sync + 'static>),
#[error("failed to create backend")]
BackendCreation(#[source] Box<dyn std::error::Error + Send + Sync + 'static>),
}