X-Git-Url: http://git.euphorik.ch/?a=blobdiff_plain;f=src%2Ferror.rs;fp=src%2Ferror.rs;h=e047f567af2aec2390335b6745dca109aa2b00bf;hb=8ba22e853dc85ebee11668c42e0cf7398a911517;hp=0000000000000000000000000000000000000000;hpb=3dbe1f5a61b18e6e2cdc05e317a14e79829e5437;p=gandi_dns_update.git diff --git a/src/error.rs b/src/error.rs new file mode 100644 index 0000000..e047f56 --- /dev/null +++ b/src/error.rs @@ -0,0 +1,15 @@ +// A generic result of type 'T'. +pub type Result = std::result::Result>; + +#[derive(Debug)] +pub struct Error { + pub message: String, +} + +impl std::fmt::Display for Error { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "Error: {}", &self.message) + } +} + +impl std::error::Error for Error {}