[−][src]Struct doublecount::AccountState
Mutable state associated with an Account.
Fields
account: Rc<Account>
The Account associated with this state
amount: Commodity
The amount of the commodity currently stored in this account
status: AccountStatus
The status of this account (open/closed/etc...)
Methods
impl AccountState
[src]
pub fn new(
account: Rc<Account>,
amount: Commodity,
status: AccountStatus
) -> AccountState
[src]
account: Rc<Account>,
amount: Commodity,
status: AccountStatus
) -> AccountState
Create a new AccountState.
pub fn open(&mut self)
[src]
Open this account, set the status
to Open
pub fn close(&mut self)
[src]
pub fn eq_approx(&self, other: &AccountState, epsilon: Decimal) -> bool
[src]
Trait Implementations
impl Clone for AccountState
[src]
fn clone(&self) -> AccountState
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for AccountState
[src]
impl PartialEq<AccountState> for AccountState
[src]
fn eq(&self, other: &AccountState) -> bool
[src]
fn ne(&self, other: &AccountState) -> bool
[src]
impl StructuralPartialEq for AccountState
[src]
Auto Trait Implementations
impl !RefUnwindSafe for AccountState
impl !Send for AccountState
impl !Sync for AccountState
impl Unpin for AccountState
impl UnwindSafe for AccountState
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,