pub trait ChildStateApi<Hash>: ClientT{
// Provided methods
fn storage_keys<'life0, 'async_trait>(
&'life0 self,
child_storage_key: PrefixedStorageKey,
prefix: StorageKey,
hash: Option<Hash>,
) -> Pin<Box<dyn Future<Output = Result<Vec<StorageKey>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: Sync + 'async_trait { ... }
fn storage_keys_paged<'life0, 'async_trait>(
&'life0 self,
child_storage_key: PrefixedStorageKey,
prefix: Option<StorageKey>,
count: u32,
start_key: Option<StorageKey>,
hash: Option<Hash>,
) -> Pin<Box<dyn Future<Output = Result<Vec<StorageKey>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: Sync + 'async_trait { ... }
fn storage<'life0, 'async_trait>(
&'life0 self,
child_storage_key: PrefixedStorageKey,
key: StorageKey,
hash: Option<Hash>,
) -> Pin<Box<dyn Future<Output = Result<Option<StorageData>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: Sync + 'async_trait { ... }
fn storage_entries<'life0, 'async_trait>(
&'life0 self,
child_storage_key: PrefixedStorageKey,
keys: Vec<StorageKey>,
hash: Option<Hash>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Option<StorageData>>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: Sync + 'async_trait { ... }
fn storage_hash<'life0, 'async_trait>(
&'life0 self,
child_storage_key: PrefixedStorageKey,
key: StorageKey,
hash: Option<Hash>,
) -> Pin<Box<dyn Future<Output = Result<Option<Hash>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: Sync + 'async_trait { ... }
fn storage_size<'life0, 'async_trait>(
&'life0 self,
child_storage_key: PrefixedStorageKey,
key: StorageKey,
hash: Option<Hash>,
) -> Pin<Box<dyn Future<Output = Result<Option<u64>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: Sync + 'async_trait { ... }
fn read_child_proof<'life0, 'async_trait>(
&'life0 self,
child_storage_key: PrefixedStorageKey,
keys: Vec<StorageKey>,
hash: Option<Hash>,
) -> Pin<Box<dyn Future<Output = Result<ReadProof<Hash>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: Sync + 'async_trait { ... }
}
Expand description
Client implementation for the ChildStateApi
RPC API.
Provided Methods§
fn storage_keys<'life0, 'async_trait>(
&'life0 self,
child_storage_key: PrefixedStorageKey,
prefix: StorageKey,
hash: Option<Hash>,
) -> Pin<Box<dyn Future<Output = Result<Vec<StorageKey>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
👎Deprecated since 2.0.0: Please use getKeysPaged
with proper paging support
fn storage_keys<'life0, 'async_trait>(
&'life0 self,
child_storage_key: PrefixedStorageKey,
prefix: StorageKey,
hash: Option<Hash>,
) -> Pin<Box<dyn Future<Output = Result<Vec<StorageKey>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
getKeysPaged
with proper paging supportReturns the keys with prefix from a child storage, leave empty to get all the keys
fn storage_keys_paged<'life0, 'async_trait>(
&'life0 self,
child_storage_key: PrefixedStorageKey,
prefix: Option<StorageKey>,
count: u32,
start_key: Option<StorageKey>,
hash: Option<Hash>,
) -> Pin<Box<dyn Future<Output = Result<Vec<StorageKey>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn storage_keys_paged<'life0, 'async_trait>(
&'life0 self,
child_storage_key: PrefixedStorageKey,
prefix: Option<StorageKey>,
count: u32,
start_key: Option<StorageKey>,
hash: Option<Hash>,
) -> Pin<Box<dyn Future<Output = Result<Vec<StorageKey>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
Returns the keys with prefix from a child storage with pagination support.
Up to count
keys will be returned.
If start_key
is passed, return next keys in storage in lexicographic order.
fn storage<'life0, 'async_trait>(
&'life0 self,
child_storage_key: PrefixedStorageKey,
key: StorageKey,
hash: Option<Hash>,
) -> Pin<Box<dyn Future<Output = Result<Option<StorageData>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn storage<'life0, 'async_trait>(
&'life0 self,
child_storage_key: PrefixedStorageKey,
key: StorageKey,
hash: Option<Hash>,
) -> Pin<Box<dyn Future<Output = Result<Option<StorageData>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
Returns a child storage entry at a specific block’s state.
fn storage_entries<'life0, 'async_trait>(
&'life0 self,
child_storage_key: PrefixedStorageKey,
keys: Vec<StorageKey>,
hash: Option<Hash>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Option<StorageData>>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn storage_entries<'life0, 'async_trait>(
&'life0 self,
child_storage_key: PrefixedStorageKey,
keys: Vec<StorageKey>,
hash: Option<Hash>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Option<StorageData>>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
Returns child storage entries for multiple keys at a specific block’s state.
fn storage_hash<'life0, 'async_trait>(
&'life0 self,
child_storage_key: PrefixedStorageKey,
key: StorageKey,
hash: Option<Hash>,
) -> Pin<Box<dyn Future<Output = Result<Option<Hash>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn storage_hash<'life0, 'async_trait>(
&'life0 self,
child_storage_key: PrefixedStorageKey,
key: StorageKey,
hash: Option<Hash>,
) -> Pin<Box<dyn Future<Output = Result<Option<Hash>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
Returns the hash of a child storage entry at a block’s state.
fn storage_size<'life0, 'async_trait>(
&'life0 self,
child_storage_key: PrefixedStorageKey,
key: StorageKey,
hash: Option<Hash>,
) -> Pin<Box<dyn Future<Output = Result<Option<u64>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn storage_size<'life0, 'async_trait>(
&'life0 self,
child_storage_key: PrefixedStorageKey,
key: StorageKey,
hash: Option<Hash>,
) -> Pin<Box<dyn Future<Output = Result<Option<u64>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
Returns the size of a child storage entry at a block’s state.
fn read_child_proof<'life0, 'async_trait>(
&'life0 self,
child_storage_key: PrefixedStorageKey,
keys: Vec<StorageKey>,
hash: Option<Hash>,
) -> Pin<Box<dyn Future<Output = Result<ReadProof<Hash>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn read_child_proof<'life0, 'async_trait>(
&'life0 self,
child_storage_key: PrefixedStorageKey,
keys: Vec<StorageKey>,
hash: Option<Hash>,
) -> Pin<Box<dyn Future<Output = Result<ReadProof<Hash>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
Returns proof of storage for child key entries at a specific block’s state.
Object Safety§
This trait is not object safe.