pub struct BankAccount { /* private fields */ }Expand description
A bank account with a number, type, and holder name.
Implementations§
Source§impl BankAccount
impl BankAccount
Sourcepub const fn new(
number: AccountNumber,
account_type: AccountType,
holder_name: AccountHolderName,
) -> Self
pub const fn new( number: AccountNumber, account_type: AccountType, holder_name: AccountHolderName, ) -> Self
Creates a bank account from validated parts.
Sourcepub const fn number(&self) -> &AccountNumber
pub const fn number(&self) -> &AccountNumber
Returns the account number.
Sourcepub fn masked_number(&self) -> MaskedAccountNumber
pub fn masked_number(&self) -> MaskedAccountNumber
Returns the masked account number.
Sourcepub const fn account_type(&self) -> AccountType
pub const fn account_type(&self) -> AccountType
Returns the account type.
Sourcepub const fn holder_name(&self) -> &AccountHolderName
pub const fn holder_name(&self) -> &AccountHolderName
Returns the account holder name.
Trait Implementations§
Source§impl Clone for BankAccount
impl Clone for BankAccount
Source§fn clone(&self) -> BankAccount
fn clone(&self) -> BankAccount
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 BankAccount
impl Debug for BankAccount
Source§impl PartialEq for BankAccount
impl PartialEq for BankAccount
impl Eq for BankAccount
impl StructuralPartialEq for BankAccount
Auto Trait Implementations§
impl Freeze for BankAccount
impl RefUnwindSafe for BankAccount
impl Send for BankAccount
impl Sync for BankAccount
impl Unpin for BankAccount
impl UnsafeUnpin for BankAccount
impl UnwindSafe for BankAccount
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