You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
413 B
Rust
20 lines
413 B
Rust
use std::io;
|
|
use thiserror::Error;
|
|
|
|
pub type DataResult<T> = Result<T, DataError>;
|
|
|
|
#[derive(Error, Debug)]
|
|
pub enum DataError {
|
|
#[error("IO Error: {0}")]
|
|
IOError(#[from] io::Error),
|
|
|
|
#[error("JSON Error: {0}")]
|
|
JsonError(#[from] serde_json::Error),
|
|
|
|
#[error("Object {0} not found")]
|
|
NotFoundError(String),
|
|
|
|
#[error("Invalid encoding of file {0}")]
|
|
InvalidEncodingError(String),
|
|
}
|