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§

source

fn get_mapped<M, D>( &self, node_id: &NodeId, partition_num: PartitionNumber, substate_key: &SubstateKey ) -> Option<D>

Gets a scrypto-decoded value by the given business key.

source

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.

Implementors§