[−][src]Struct solana_move_loader_api::data_store::DataStore
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]
&mut self,
access_path: AccessPath,
data_blob: Vec<u8>
) -> Option<Vec<u8>>
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]
fn get(&self, access_path: &AccessPath) -> Result<Option<Vec<u8>>>
[src]
fn multi_get(
&self,
_access_paths: &[AccessPath]
) -> Result<Vec<Option<Vec<u8>>>>
[src]
&self,
_access_paths: &[AccessPath]
) -> Result<Vec<Option<Vec<u8>>>>
fn is_genesis(&self) -> bool
[src]
impl RemoteCache for DataStore
[src]
Auto Trait Implementations
impl Sync for DataStore
impl Send for DataStore
impl Unpin for DataStore
impl RefUnwindSafe for DataStore
impl UnwindSafe for DataStore
Blanket Implementations
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Clear for T where
T: InitializableFromZeroed + ?Sized,
T: InitializableFromZeroed + ?Sized,
fn clear(&mut self)
impl<T> InitializableFromZeroed for T where
T: Default,
T: Default,
unsafe fn initialize(place: *mut T)
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,
fn vzip(self) -> V
impl<T> Erased for T
impl<T> SendSyncUnwindSafe for T where
T: Send + Sync + UnwindSafe + ?Sized,
T: Send + Sync + UnwindSafe + ?Sized,
impl<T> Erased for T
impl<T> Typeable for T where
T: Any,
T: Any,