pub struct BasicAccount { /* private fields */ }Expand description
Basic account implementation with balance, currency, and account number
Implementations§
Trait Implementations§
Source§impl Account for BasicAccount
impl Account for BasicAccount
fn get_balance(&self) -> f64
fn deposit(&mut self, amount: f64) -> AccountResponse
fn withdraw(&mut self, amount: f64) -> AccountResponse
fn get_currency(&self) -> &str
fn get_account_number(&self) -> &str
fn get_account_type(&self) -> AccountType
fn transfer( &mut self, to_account: &mut dyn Account, amount: f64, ) -> AccountTransferResponse
fn get_overdraft_limit(&self) -> f64
Source§impl Debug for BasicAccount
impl Debug for BasicAccount
Source§impl DisplayAccount for BasicAccount
impl DisplayAccount for BasicAccount
fn display_details(&self)
Auto Trait Implementations§
impl Freeze for BasicAccount
impl RefUnwindSafe for BasicAccount
impl Send for BasicAccount
impl Sync for BasicAccount
impl Unpin for BasicAccount
impl UnwindSafe for BasicAccount
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