use {
crate::models,
serde::{Deserialize, Serialize},
};
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum AccountType {
#[serde(rename = "EXCHANGE_ACCOUNT")]
ExchangeAccount,
#[serde(rename = "UNMANAGED_WALLET")]
UnmanagedWallet,
#[serde(rename = "VAULT_ACCOUNT")]
VaultAccount,
#[serde(rename = "NETWORK_CONNECTION")]
NetworkConnection,
#[serde(rename = "FIAT_ACCOUNT")]
FiatAccount,
}
impl std::fmt::Display for AccountType {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
match self {
Self::ExchangeAccount => write!(f, "EXCHANGE_ACCOUNT"),
Self::UnmanagedWallet => write!(f, "UNMANAGED_WALLET"),
Self::VaultAccount => write!(f, "VAULT_ACCOUNT"),
Self::NetworkConnection => write!(f, "NETWORK_CONNECTION"),
Self::FiatAccount => write!(f, "FIAT_ACCOUNT"),
}
}
}
impl Default for AccountType {
fn default() -> AccountType {
Self::ExchangeAccount
}
}