Trait ChildStateApiServer
pub trait ChildStateApiServer<Hash>:
    Sized
    + Send
    + Sync
    + 'static {
    // Required methods
    fn storage_keys(
        &self,
        child_storage_key: PrefixedStorageKey,
        prefix: StorageKey,
        hash: Option<Hash>,
    ) -> Result<Vec<StorageKey>, Error>;
    fn storage_keys_paged(
        &self,
        child_storage_key: PrefixedStorageKey,
        prefix: Option<StorageKey>,
        count: u32,
        start_key: Option<StorageKey>,
        hash: Option<Hash>,
    ) -> Result<Vec<StorageKey>, Error>;
    fn storage(
        &self,
        child_storage_key: PrefixedStorageKey,
        key: StorageKey,
        hash: Option<Hash>,
    ) -> Result<Option<StorageData>, Error>;
    fn storage_entries(
        &self,
        child_storage_key: PrefixedStorageKey,
        keys: Vec<StorageKey>,
        hash: Option<Hash>,
    ) -> Result<Vec<Option<StorageData>>, Error>;
    fn storage_hash(
        &self,
        child_storage_key: PrefixedStorageKey,
        key: StorageKey,
        hash: Option<Hash>,
    ) -> Result<Option<Hash>, Error>;
    fn storage_size(
        &self,
        child_storage_key: PrefixedStorageKey,
        key: StorageKey,
        hash: Option<Hash>,
    ) -> Result<Option<u64>, Error>;
    fn read_child_proof(
        &self,
        child_storage_key: PrefixedStorageKey,
        keys: Vec<StorageKey>,
        hash: Option<Hash>,
    ) -> Result<ReadProof<Hash>, Error>;
    // Provided method
    fn into_rpc(self) -> RpcModule<Self>
       where Hash: Send + Sync + 'static + DeserializeOwned + Clone + Serialize { ... }
}Expand description
Server trait implementation for the ChildStateApi RPC API.
Required Methods§
fn storage_keys(
    &self,
    child_storage_key: PrefixedStorageKey,
    prefix: StorageKey,
    hash: Option<Hash>,
) -> Result<Vec<StorageKey>, Error>
fn storage_keys( &self, child_storage_key: PrefixedStorageKey, prefix: StorageKey, hash: Option<Hash>, ) -> Result<Vec<StorageKey>, Error>
Returns the keys with prefix from a child storage, leave empty to get all the keys
fn storage_keys_paged(
    &self,
    child_storage_key: PrefixedStorageKey,
    prefix: Option<StorageKey>,
    count: u32,
    start_key: Option<StorageKey>,
    hash: Option<Hash>,
) -> Result<Vec<StorageKey>, Error>
fn storage_keys_paged( &self, child_storage_key: PrefixedStorageKey, prefix: Option<StorageKey>, count: u32, start_key: Option<StorageKey>, hash: Option<Hash>, ) -> Result<Vec<StorageKey>, Error>
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(
    &self,
    child_storage_key: PrefixedStorageKey,
    key: StorageKey,
    hash: Option<Hash>,
) -> Result<Option<StorageData>, Error>
fn storage( &self, child_storage_key: PrefixedStorageKey, key: StorageKey, hash: Option<Hash>, ) -> Result<Option<StorageData>, Error>
Returns a child storage entry at a specific block’s state.
fn storage_entries(
    &self,
    child_storage_key: PrefixedStorageKey,
    keys: Vec<StorageKey>,
    hash: Option<Hash>,
) -> Result<Vec<Option<StorageData>>, Error>
fn storage_entries( &self, child_storage_key: PrefixedStorageKey, keys: Vec<StorageKey>, hash: Option<Hash>, ) -> Result<Vec<Option<StorageData>>, Error>
Returns child storage entries for multiple keys at a specific block’s state.
fn storage_hash(
    &self,
    child_storage_key: PrefixedStorageKey,
    key: StorageKey,
    hash: Option<Hash>,
) -> Result<Option<Hash>, Error>
fn storage_hash( &self, child_storage_key: PrefixedStorageKey, key: StorageKey, hash: Option<Hash>, ) -> Result<Option<Hash>, Error>
Returns the hash of a child storage entry at a block’s state.
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.