time_primitives

Trait ShardsApi

Source
pub trait ShardsApi<Block: BlockT>: Core<Block> {
    // Provided methods
    fn shards(
        &self,
        __runtime_api_at_param__: <Block as BlockT>::Hash,
        account: &AccountId,
    ) -> Result<Vec<ShardId>, ApiError> { ... }
    fn shard_members(
        &self,
        __runtime_api_at_param__: <Block as BlockT>::Hash,
        shard_id: ShardId,
    ) -> Result<Vec<(AccountId, MemberStatus)>, ApiError> { ... }
    fn shard_threshold(
        &self,
        __runtime_api_at_param__: <Block as BlockT>::Hash,
        shard_id: ShardId,
    ) -> Result<u16, ApiError> { ... }
    fn shard_status(
        &self,
        __runtime_api_at_param__: <Block as BlockT>::Hash,
        shard_id: ShardId,
    ) -> Result<ShardStatus, ApiError> { ... }
    fn shard_commitment(
        &self,
        __runtime_api_at_param__: <Block as BlockT>::Hash,
        shard_id: ShardId,
    ) -> Result<Option<Commitment>, ApiError> { ... }
}

Provided Methods§

Source

fn shards( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, account: &AccountId, ) -> Result<Vec<ShardId>, ApiError>

Source

fn shard_members( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, shard_id: ShardId, ) -> Result<Vec<(AccountId, MemberStatus)>, ApiError>

Source

fn shard_threshold( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, shard_id: ShardId, ) -> Result<u16, ApiError>

Source

fn shard_status( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, shard_id: ShardId, ) -> Result<ShardStatus, ApiError>

Source

fn shard_commitment( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, shard_id: ShardId, ) -> Result<Option<Commitment>, ApiError>

Trait Implementations§

Source§

impl<Block: BlockT> RuntimeApiInfo for dyn ShardsApi<Block>

Source§

const ID: [u8; 8]

The identifier of the runtime api.
Source§

const VERSION: u32 = 1u32

The version of the runtime api.

Implementors§