1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
use thiserror::Error;
#[derive(Error, Debug)]
pub enum RepositoryError {
#[error("Failed to serialise struct to JSON")]
JsonSerialisationError,
#[error("Failed to deserialise JSON to struct")]
JsonDeserialisationError,
#[error("Failed to write data to the repository")]
WriteError,
#[error("Failed to read data from the repository")]
ReadError,
#[error("Failed to delete data from the repository")]
DeleteError,
#[error("Failed to retrieve expected data due to it not being present")]
ExpectedDataNotPresentError
}