pub enum BankingCommand {
CreateAccount {
account_id: String,
initial_balance: i64,
},
Deposit {
account_id: String,
amount: i64,
},
Withdraw {
account_id: String,
amount: i64,
},
Transfer {
from_account: String,
to_account: String,
amount: i64,
},
GetBalance {
account_id: String,
},
GetAccount {
account_id: String,
},
ListAccounts,
GetTransactionHistory {
account_id: Option<String>,
limit: Option<usize>,
},
}Expand description
Commands that can be applied to the banking system
Variants§
CreateAccount
Create a new account
Deposit
Deposit money into an account
Withdraw
Withdraw money from an account
Transfer
Transfer money between accounts
GetBalance
Get account balance
GetAccount
Get account information
ListAccounts
List all accounts
GetTransactionHistory
Get transaction history
Trait Implementations§
Source§impl Clone for BankingCommand
impl Clone for BankingCommand
Source§fn clone(&self) -> BankingCommand
fn clone(&self) -> BankingCommand
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BankingCommand
impl Debug for BankingCommand
Source§impl<'de> Deserialize<'de> for BankingCommand
impl<'de> Deserialize<'de> for BankingCommand
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for BankingCommand
impl PartialEq for BankingCommand
Source§impl Serialize for BankingCommand
impl Serialize for BankingCommand
impl StructuralPartialEq for BankingCommand
Auto Trait Implementations§
impl Freeze for BankingCommand
impl RefUnwindSafe for BankingCommand
impl Send for BankingCommand
impl Sync for BankingCommand
impl Unpin for BankingCommand
impl UnsafeUnpin for BankingCommand
impl UnwindSafe for BankingCommand
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more