Trait iota_types::storage::Storage

source ·
pub trait Storage {
    // Required methods
    fn reset(&mut self);
    fn read_object(&self, id: &ObjectID) -> Option<&Object>;
    fn record_execution_results(&mut self, results: ExecutionResults);
    fn save_loaded_runtime_objects(
        &mut self,
        loaded_runtime_objects: BTreeMap<ObjectID, DynamicallyLoadedObjectMetadata>,
    );
    fn save_wrapped_object_containers(
        &mut self,
        wrapped_object_containers: BTreeMap<ObjectID, ObjectID>,
    );
    fn check_coin_deny_list(
        &self,
        written_objects: &BTreeMap<ObjectID, Object>,
    ) -> DenyListResult;
}
Expand description

An abstraction of the (possibly distributed) store for objects, and (soon) events and transactions

Required Methods§

source

fn reset(&mut self)

source

fn read_object(&self, id: &ObjectID) -> Option<&Object>

source

fn record_execution_results(&mut self, results: ExecutionResults)

source

fn save_loaded_runtime_objects( &mut self, loaded_runtime_objects: BTreeMap<ObjectID, DynamicallyLoadedObjectMetadata>, )

source

fn save_wrapped_object_containers( &mut self, wrapped_object_containers: BTreeMap<ObjectID, ObjectID>, )

source

fn check_coin_deny_list( &self, written_objects: &BTreeMap<ObjectID, Object>, ) -> DenyListResult

Check coin denylist during execution, and the number of non-gas-coin owners.

Implementors§