pub trait ChildStateBackend<Block, Client>: Send + Sync + 'static
where Block: BlockT + 'static, Client: Send + Sync + 'static,
{ // Required methods fn read_child_proof( &self, block: Option<Block::Hash>, storage_key: PrefixedStorageKey, keys: Vec<StorageKey> ) -> Result<ReadProof<Block::Hash>, Error>; fn storage_keys( &self, block: Option<Block::Hash>, storage_key: PrefixedStorageKey, prefix: StorageKey ) -> Result<Vec<StorageKey>, Error>; fn storage_keys_paged( &self, block: Option<Block::Hash>, storage_key: PrefixedStorageKey, prefix: Option<StorageKey>, count: u32, start_key: Option<StorageKey> ) -> Result<Vec<StorageKey>, Error>; fn storage( &self, block: Option<Block::Hash>, storage_key: PrefixedStorageKey, key: StorageKey ) -> Result<Option<StorageData>, Error>; fn storage_entries( &self, block: Option<Block::Hash>, storage_key: PrefixedStorageKey, keys: Vec<StorageKey> ) -> Result<Vec<Option<StorageData>>, Error>; fn storage_hash( &self, block: Option<Block::Hash>, storage_key: PrefixedStorageKey, key: StorageKey ) -> Result<Option<Block::Hash>, Error>; // Provided method fn storage_size( &self, block: Option<Block::Hash>, storage_key: PrefixedStorageKey, key: StorageKey ) -> Result<Option<u64>, Error> { ... } }
Expand description

Child state backend API.

Required Methods§

source

fn read_child_proof( &self, block: Option<Block::Hash>, storage_key: PrefixedStorageKey, keys: Vec<StorageKey> ) -> Result<ReadProof<Block::Hash>, Error>

Returns proof of storage for a child key entries at a specific block’s state.

source

fn storage_keys( &self, block: Option<Block::Hash>, storage_key: PrefixedStorageKey, prefix: StorageKey ) -> Result<Vec<StorageKey>, Error>

Returns the keys with prefix from a child storage, leave prefix empty to get all the keys.

source

fn storage_keys_paged( &self, block: Option<Block::Hash>, storage_key: PrefixedStorageKey, prefix: Option<StorageKey>, count: u32, start_key: Option<StorageKey> ) -> Result<Vec<StorageKey>, Error>

Returns the keys with prefix from a child storage with pagination support.

source

fn storage( &self, block: Option<Block::Hash>, storage_key: PrefixedStorageKey, key: StorageKey ) -> Result<Option<StorageData>, Error>

Returns a child storage entry at a specific block’s state.

source

fn storage_entries( &self, block: Option<Block::Hash>, storage_key: PrefixedStorageKey, keys: Vec<StorageKey> ) -> Result<Vec<Option<StorageData>>, Error>

Returns child storage entries at a specific block’s state.

source

fn storage_hash( &self, block: Option<Block::Hash>, storage_key: PrefixedStorageKey, key: StorageKey ) -> Result<Option<Block::Hash>, Error>

Returns the hash of a child storage entry at a block’s state.

Provided Methods§

source

fn storage_size( &self, block: Option<Block::Hash>, storage_key: PrefixedStorageKey, key: StorageKey ) -> Result<Option<u64>, Error>

Returns the size of a child storage entry at a block’s state.

Implementors§