[][src]Struct solana_move_loader_api::data_store::DataStore

pub struct DataStore { /* fields omitted */ }

An in-memory implementation of [StateView] and [RemoteCache] for the VM.

Methods

impl DataStore[src]

pub fn new(data: IndexMap<AccessPath, Vec<u8>>) -> Self[src]

Creates a new DataStore with the provided initial data.

pub fn apply_write_set(&mut self, write_set: &WriteSet)[src]

Applies a [WriteSet] to this data store.

pub fn into_write_sets(self) -> Result<IndexMap<AccountAddress, WriteSet>>[src]

Returns a WriteSet for each account in the DataStore

pub fn read_account_resource(&self, addr: &AccountAddress) -> Option<Value>[src]

Read an account's resource

pub fn set(
    &mut self,
    access_path: AccessPath,
    data_blob: Vec<u8>
) -> Option<Vec<u8>>
[src]

Sets a (key, value) pair within this data store.

Returns the previous data if the key was occupied.

pub fn remove(&mut self, access_path: &AccessPath) -> Option<Vec<u8>>[src]

Deletes a key from this data store.

Returns the previous data if the key was occupied.

pub fn add_module(&mut self, module_id: &ModuleId, module: &CompiledModule)[src]

Adds a [CompiledModule] to this data store.

Does not do any sort of verification on the module.

pub fn dump(&self)[src]

Dumps the data store to stdout

Trait Implementations

impl Default for DataStore[src]

impl Debug for DataStore[src]

impl StateView for DataStore[src]

impl RemoteCache for DataStore[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, 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> Borrow<T> for T where
    T: ?Sized
[src]

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

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

impl<T> Clear for T where
    T: InitializableFromZeroed + ?Sized

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> InitializableFromZeroed for T where
    T: Default

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> Erased for T

impl<T> SendSyncUnwindSafe for T where
    T: Send + Sync + UnwindSafe + ?Sized

impl<T> Erased for T

impl<T> Typeable for T where
    T: Any

fn get_type(&self) -> TypeId

Get the TypeId of this object.