[WIP] authenticate working

This commit is contained in:
2021-05-22 20:24:44 +02:00
parent faa8c8e0a5
commit baec902243
7 changed files with 144 additions and 9 deletions

View File

@ -12,6 +12,7 @@ pub enum Kind {
NotImplementedError,
UsimpProtocolError,
Utf8DecodeError,
AuthenticationError,
}
#[derive(Copy, Clone, Debug)]
@ -61,6 +62,7 @@ impl Error {
Kind::NotImplementedError => "Not yet implemented",
Kind::UsimpProtocolError => "USIMP protocol error",
Kind::Utf8DecodeError => "Unable to decode UTF-8 data",
Kind::AuthenticationError => "Unable to authenticate",
},
}
}
@ -91,6 +93,7 @@ impl fmt::Display for Error {
Kind::NotImplementedError => "not yet implemented",
Kind::UsimpProtocolError => "usimp protocol error",
Kind::Utf8DecodeError => "unable to decode utf-8 data",
Kind::AuthenticationError => "unable to authenticate",
}
.to_string();
if let Some(desc) = &self.desc {