diff --git a/src/service/error.rs b/src/service/error.rs new file mode 100644 index 000000000..dad7c0028 --- /dev/null +++ b/src/service/error.rs @@ -0,0 +1,20 @@ +use std::fmt; + +pub type Result = std::result::Result; + +#[derive(Debug, Copy, Clone)] +pub enum ServicesError { + ResonseError(&'static str), +} + +impl std::error::Error for ServicesError {} + +impl fmt::Display for ServicesError { + fn fmt(&self, f: &mut fmt::Formatter) -> std::fmt::Result { + match *self { + ServicesError::ResonseError(ref err) => write!(f, "Response: {}", err), + } + } +} + +