pub struct State<D: KeyValueDB, P: PoolParams> {
    pub tree: MerkleTree<D, P>,
    pub latest_account_index: Option<u64>,
    pub latest_note_index: u64,
    /* private fields */
}

Fields

tree: MerkleTree<D, P>latest_account_index: Option<u64>latest_note_index: u64

Latest owned note index

Implementations

Add OUT + 1 hashes to the tree

Add hashes, account, and notes to state

Cache account at specified index.

Caches a note at specified index.

Return an index of a earliest usable note.

Return an index of a earliest usable note including optimistic state

Returns user’s total balance (account + available notes).

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
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.