Trait sc_rpc::state::ChildStateBackend [−][src]
pub trait ChildStateBackend<Block: BlockT, Client>: Send + Sync + 'static where
Block: BlockT + 'static,
Client: Send + Sync + 'static, { fn read_child_proof(
&self,
block: Option<Block::Hash>,
storage_key: PrefixedStorageKey,
keys: Vec<StorageKey>
) -> FutureResult<ReadProof<Block::Hash>>; fn storage_keys(
&self,
block: Option<Block::Hash>,
storage_key: PrefixedStorageKey,
prefix: StorageKey
) -> FutureResult<Vec<StorageKey>>; fn storage_keys_paged(
&self,
block: Option<Block::Hash>,
storage_key: PrefixedStorageKey,
prefix: Option<StorageKey>,
count: u32,
start_key: Option<StorageKey>
) -> FutureResult<Vec<StorageKey>>; fn storage(
&self,
block: Option<Block::Hash>,
storage_key: PrefixedStorageKey,
key: StorageKey
) -> FutureResult<Option<StorageData>>; fn storage_hash(
&self,
block: Option<Block::Hash>,
storage_key: PrefixedStorageKey,
key: StorageKey
) -> FutureResult<Option<Block::Hash>>; fn storage_size(
&self,
block: Option<Block::Hash>,
storage_key: PrefixedStorageKey,
key: StorageKey
) -> FutureResult<Option<u64>> { ... } }
Expand description
Child state backend API.
Required methods
fn read_child_proof(
&self,
block: Option<Block::Hash>,
storage_key: PrefixedStorageKey,
keys: Vec<StorageKey>
) -> FutureResult<ReadProof<Block::Hash>>
fn read_child_proof(
&self,
block: Option<Block::Hash>,
storage_key: PrefixedStorageKey,
keys: Vec<StorageKey>
) -> FutureResult<ReadProof<Block::Hash>>
Returns proof of storage for a child key entries at a specific block’s state.
fn storage_keys(
&self,
block: Option<Block::Hash>,
storage_key: PrefixedStorageKey,
prefix: StorageKey
) -> FutureResult<Vec<StorageKey>>
fn storage_keys(
&self,
block: Option<Block::Hash>,
storage_key: PrefixedStorageKey,
prefix: StorageKey
) -> FutureResult<Vec<StorageKey>>
Returns the keys with prefix from a child storage, leave prefix empty to get all the keys.
fn storage_keys_paged(
&self,
block: Option<Block::Hash>,
storage_key: PrefixedStorageKey,
prefix: Option<StorageKey>,
count: u32,
start_key: Option<StorageKey>
) -> FutureResult<Vec<StorageKey>>
fn storage_keys_paged(
&self,
block: Option<Block::Hash>,
storage_key: PrefixedStorageKey,
prefix: Option<StorageKey>,
count: u32,
start_key: Option<StorageKey>
) -> FutureResult<Vec<StorageKey>>
Returns the keys with prefix from a child storage with pagination support.
fn storage(
&self,
block: Option<Block::Hash>,
storage_key: PrefixedStorageKey,
key: StorageKey
) -> FutureResult<Option<StorageData>>
fn storage(
&self,
block: Option<Block::Hash>,
storage_key: PrefixedStorageKey,
key: StorageKey
) -> FutureResult<Option<StorageData>>
Returns a child storage entry at a specific block’s state.
fn storage_hash(
&self,
block: Option<Block::Hash>,
storage_key: PrefixedStorageKey,
key: StorageKey
) -> FutureResult<Option<Block::Hash>>
fn storage_hash(
&self,
block: Option<Block::Hash>,
storage_key: PrefixedStorageKey,
key: StorageKey
) -> FutureResult<Option<Block::Hash>>
Returns the hash of a child storage entry at a block’s state.
Provided methods
fn storage_size(
&self,
block: Option<Block::Hash>,
storage_key: PrefixedStorageKey,
key: StorageKey
) -> FutureResult<Option<u64>>
fn storage_size(
&self,
block: Option<Block::Hash>,
storage_key: PrefixedStorageKey,
key: StorageKey
) -> FutureResult<Option<u64>>
Returns the size of a child storage entry at a block’s state.