Split in modules
[gandi_dns_update.git] / src / error.rs
1 // A generic result of type 'T'.
2 pub type Result<T> = std::result::Result<T, Box<dyn std::error::Error>>;
3
4 #[derive(Debug)]
5 pub struct Error {
6 pub message: String
7 }
8
9 impl std::fmt::Display for Error {
10 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
11 write!(f, "Error: {}", &self.message)
12 }
13 }
14
15 impl std::error::Error for Error { }