17 lines
355 B
Rust
17 lines
355 B
Rust
use thiserror::Error;
|
|
|
|
#[derive(Error, Debug)]
|
|
pub enum Error {
|
|
#[error(transparent)]
|
|
Serialization(bincode::Error),
|
|
#[error(transparent)]
|
|
IO(std::io::Error),
|
|
#[error(transparent)]
|
|
Other(#[from] anyhow::Error),
|
|
}
|
|
|
|
impl From<std::io::Error> for Error {
|
|
fn from(error: std::io::Error) -> Error {
|
|
Error::IO(error)
|
|
}
|
|
}
|