Trait scrypto_test::prelude::MappedSubstateDatabase
source · pub trait MappedSubstateDatabase {
// Required methods
fn get_mapped<M, D>(
&self,
node_id: &NodeId,
partition_num: PartitionNumber,
substate_key: &SubstateKey
) -> Option<D>
where M: DatabaseKeyMapper,
D: ScryptoDecode;
fn list_mapped<M, D, K>(
&self,
node_id: &NodeId,
partition_num: PartitionNumber
) -> Box<dyn Iterator<Item = (SubstateKey, D)> + '_>
where M: DatabaseKeyMapper,
D: ScryptoDecode,
K: SubstateKeyContent + 'static;
}
Expand description
Convenience methods for direct SubstateDatabase
readers.
Required Methods§
sourcefn get_mapped<M, D>(
&self,
node_id: &NodeId,
partition_num: PartitionNumber,
substate_key: &SubstateKey
) -> Option<D>where
M: DatabaseKeyMapper,
D: ScryptoDecode,
fn get_mapped<M, D>(
&self,
node_id: &NodeId,
partition_num: PartitionNumber,
substate_key: &SubstateKey
) -> Option<D>where
M: DatabaseKeyMapper,
D: ScryptoDecode,
Gets a scrypto-decoded value by the given business key.
sourcefn list_mapped<M, D, K>(
&self,
node_id: &NodeId,
partition_num: PartitionNumber
) -> Box<dyn Iterator<Item = (SubstateKey, D)> + '_>
fn list_mapped<M, D, K>( &self, node_id: &NodeId, partition_num: PartitionNumber ) -> Box<dyn Iterator<Item = (SubstateKey, D)> + '_>
Lists fully-mapped entries (i.e. business substate keys and scrypto-decoded values) of the given node partition.
Object Safety§
This trait is not object safe.