1#[derive(Debug, Clone)]
9pub enum AvinError {
10 InvalidValue(String),
11 NotFound(String),
12 NotLoaded(String),
13 ReadError(String),
14 WriteError(String),
15}
16
17impl std::fmt::Display for AvinError {
18 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
19 match self {
20 Self::InvalidValue(s) => write!(f, "InvalidValue: {}", s),
21 Self::NotFound(s) => write!(f, "NotFound: {}", s),
22 Self::NotLoaded(s) => write!(f, "NotLoaded: {}", s),
23 Self::ReadError(s) => write!(f, "ReadError: {}", s),
24 Self::WriteError(s) => write!(f, "WriteError: {}", s),
25 }
26 }
27}