[−][src]Struct doublecount::ProgramState
The state of a Program being executed.
Fields
account_states: HashMap<AccountID, AccountState>
list of states associated with accounts (can only grow)
failed_balance_assertions: Vec<FailedBalanceAssertion>
list of failed assertions, and associated failed balance
Methods
impl ProgramState
[src]
pub fn new(
accounts: &Vec<Rc<Account>>,
account_status: AccountStatus
) -> ProgramState
[src]
accounts: &Vec<Rc<Account>>,
account_status: AccountStatus
) -> ProgramState
Create a new ProgramState.
pub fn execute_program(
&mut self,
program: &Program
) -> Result<(), AccountingError>
[src]
&mut self,
program: &Program
) -> Result<(), AccountingError>
Execute a given Program to mutate this state.
pub fn get_account_state(&self, account_id: &AccountID) -> Option<&AccountState>
[src]
Get a reference to the AccountState
associated with a given Account
.
pub fn get_account_state_mut(
&mut self,
account_id: &AccountID
) -> Option<&mut AccountState>
[src]
&mut self,
account_id: &AccountID
) -> Option<&mut AccountState>
Get a mutable reference to the AccountState
associated with the given Account
.
pub fn record_failed_balance_assertion(
&mut self,
failed_balance_assertion: FailedBalanceAssertion
)
[src]
&mut self,
failed_balance_assertion: FailedBalanceAssertion
)
Record a failed BalanceAssertion using a FailedBalanceAssertion.
Auto Trait Implementations
impl !RefUnwindSafe for ProgramState
impl !Send for ProgramState
impl !Sync for ProgramState
impl Unpin for ProgramState
impl !UnwindSafe for ProgramState
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, 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>,