Trait sc_client_api::backend::StorageProvider[][src]

pub trait StorageProvider<Block: BlockT, B: Backend<Block>> {
    fn storage(
        &self,
        id: &BlockId<Block>,
        key: &StorageKey
    ) -> Result<Option<StorageData>>;
fn storage_keys(
        &self,
        id: &BlockId<Block>,
        key_prefix: &StorageKey
    ) -> Result<Vec<StorageKey>>;
fn storage_hash(
        &self,
        id: &BlockId<Block>,
        key: &StorageKey
    ) -> Result<Option<Block::Hash>>;
fn storage_pairs(
        &self,
        id: &BlockId<Block>,
        key_prefix: &StorageKey
    ) -> Result<Vec<(StorageKey, StorageData)>>;
fn storage_keys_iter<'a>(
        &self,
        id: &BlockId<Block>,
        prefix: Option<&'a StorageKey>,
        start_key: Option<&StorageKey>
    ) -> Result<KeyIterator<'a, B::State, Block>>;
fn child_storage(
        &self,
        id: &BlockId<Block>,
        child_info: &ChildInfo,
        key: &StorageKey
    ) -> Result<Option<StorageData>>;
fn child_storage_keys(
        &self,
        id: &BlockId<Block>,
        child_info: &ChildInfo,
        key_prefix: &StorageKey
    ) -> Result<Vec<StorageKey>>;
fn child_storage_keys_iter<'a>(
        &self,
        id: &BlockId<Block>,
        child_info: ChildInfo,
        prefix: Option<&'a StorageKey>,
        start_key: Option<&StorageKey>
    ) -> Result<KeyIterator<'a, B::State, Block>>;
fn child_storage_hash(
        &self,
        id: &BlockId<Block>,
        child_info: &ChildInfo,
        key: &StorageKey
    ) -> Result<Option<Block::Hash>>; }
Expand description

Provides acess to storage primitives

Required methods

Given a BlockId and a key, return the value under the key in that block.

Given a BlockId and a key prefix, return the matching storage keys in that block.

Given a BlockId and a key, return the value under the hash in that block.

Given a BlockId and a key prefix, return the matching child storage keys and values in that block.

Given a BlockId and a key prefix, return a KeyIterator iterates matching storage keys in that block.

Given a BlockId, a key and a child storage key, return the value under the key in that block.

Given a BlockId, a key prefix, and a child storage key, return the matching child storage keys.

Given a BlockId and a key prefix and a child storage key, return a KeyIterator that iterates matching storage keys in that block.

Given a BlockId, a key and a child storage key, return the hash under the key in that block.

Implementors