[][src]Struct transact::state::hashmap::HashMapState

pub struct HashMapState { /* fields omitted */ }

An in-memory implementation of state.

Stores a series of individual States in a collective HashMap, where each individual state HashMap is stored by its ID. No individual State gets modified on updates, a new State is simply inserted into States.

Methods

impl HashMapState[src]

pub fn new() -> Self[src]

Create a new HashMapState.

Adds the empty state as a starting state.

pub fn state_id(state: &State) -> String[src]

Calculate the ID of the given state.

Trait Implementations

impl Write for HashMapState[src]

type StateId = String

A reference to a checkpoint in state. It could be a merkle hash for a merkle database. Read more

type Key = String

The Key that is being stored in state.

type Value = Vec<u8>

The Value that is being stored in state.

impl Read for HashMapState[src]

type StateId = String

A reference to a checkpoint in state. It could be a merkle hash for a merkle database. Read more

type Key = String

The Key that is being stored in state.

type Value = Vec<u8>

The Value that is being stored in state.

impl Default for HashMapState[src]

impl Clone for HashMapState[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for HashMapState[src]

Auto Trait Implementations

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> SafeBorrow<T> for T where
    T: ?Sized

impl<'a, T> DefaultFeatures<'a> for T where
    T: 'a + Send + Sync + Clone

impl<'a, T> NonSyncFeatures<'a> for T where
    T: 'a + Clone

impl<T> Same<T> for T

type Output = T

Should always be Self