1 use failure::Fail; 2 use std::error::Error; 3 // #[derive(Debug)] 4 // pub struct ServerError { 5 // pub value: ServerErrorValue, 6 // } 7 8 // #[derive(Debug, Fail)] 9 // pub enum ServerErrorValue { 10 // #[fail(display = "server error")] 11 // Error(Error), 12 // } 13 14 // impl From<Error> for ServerError { 15 // fn from(error: Error) -> Self { 16 // ServerError { 17 // value: ServerErrorValue::Error(error), 18 // } 19 // } 20 // } 21