1 2 3 4 5 6 7 8 9 10 11
#[derive(Debug)] pub enum DatabaseError { IOError(std::io::Error), ItemNotFound } impl From<std::io::Error> for DatabaseError { fn from(e: std::io::Error) -> Self { DatabaseError::IOError(e) } }