1use thiserror::Error;
2
3#[derive(Debug, Error)]
8pub enum KoitError {
9 #[error("the database failed to serialize")]
11 ToFormat(#[source] Box<dyn std::error::Error + Send + Sync + 'static>),
12 #[error("the database failed to deserialize")]
14 FromFormat(#[source] Box<dyn std::error::Error + Send + Sync + 'static>),
15 #[error("failed to read from the backend")]
17 BackendRead(#[source] Box<dyn std::error::Error + Send + Sync + 'static>),
18 #[error("failed to write to the backend")]
20 BackendWrite(#[source] Box<dyn std::error::Error + Send + Sync + 'static>),
21 #[error("failed to create backend")]
23 BackendCreation(#[source] Box<dyn std::error::Error + Send + Sync + 'static>),
24}