Struct brb_dt_at2::bank::Bank[][src]

pub struct Bank<A: Ord + Hash> { /* fields omitted */ }
Expand description

AT2 Bank for a particular Actor

Implementations

Open a new account.

The balance field should normally be 0, but this field enables an application to force a non-zero starting balance. Though of course other nodes must agree. This could for example be used to pre-fund a “MINT” account that spends money into existence (in other accounts) over time.

Returns an account’s starting balance, prior to any transfers in or out.

Returns an account’s present balance.

This is presently a slow operation as the entire history of all transfers is iterated. i.e., it degrades O(n) with the size of the history.

Generates a new Transfer operation (but does not apply it)

Trait Implementations

Protection against Byzantines

Executed once an op has been validated

The set of ops this data type accepts

A validation error specific to this data type.

initialize a new replica of this datatype

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.