Просмотр исходного кода

add more errors to ClientField enum

ghassmo 4 лет назад
Родитель
Сommit
493c5fb2f9
1 измененных файлов с 6 добавлено и 0 удалено
  1. 6 0
      src/client/mod.rs

+ 6 - 0
src/client/mod.rs

@@ -11,6 +11,9 @@ pub enum ClientFailed {
     UnvalidAmount(u64),
     UnableToGetDepositAddress,
     UnableToGetWithdrawAddress,
+    DoNotHaveCashierPublicKey,
+    DoNotHavePublicKey,
+    DoNotHavePrivateKey,
     EmptyPassword,
     ClientError(String),
 }
@@ -33,6 +36,9 @@ impl fmt::Display for ClientFailed {
             ClientFailed::UnableToGetWithdrawAddress => {
                 f.write_str("Unable to get withdraw address")
             }
+            ClientFailed::DoNotHaveCashierPublicKey => f.write_str("Don't have cashier public key"),
+            ClientFailed::DoNotHavePublicKey => f.write_str("Don't have public key"),
+            ClientFailed::DoNotHavePrivateKey => f.write_str("Don't have private key"),
             ClientFailed::EmptyPassword => f.write_str("Password is empty. Cannot create database"),
             ClientFailed::ClientError(i) => {
                 write!(f, "ClientError: {}", i)