referrerpolicy=no-referrer-when-downgrade

Trait sc_rpc::dev::DevApiServer

pub trait DevApiServer<Hash>: Sized + Send + Sync + 'static {
    // Required method
    fn block_stats(
        &self,
        ext: &Extensions,
        block_hash: Hash,
    ) -> Result<Option<BlockStats>, Error>;

    // Provided method
    fn into_rpc(self) -> RpcModule<Self>
       where Hash: Send + Sync + 'static + DeserializeOwned { ... }
}
Expand description

Server trait implementation for the DevApi RPC API.

Required Methods§

fn block_stats( &self, ext: &Extensions, block_hash: Hash, ) -> Result<Option<BlockStats>, Error>

Reexecute the specified block_hash and gather statistics while doing so.

This function requires the specified block and its parent to be available at the queried node. If either the specified block or the parent is pruned, this function will return None.

Provided Methods§

fn into_rpc(self) -> RpcModule<Self>
where Hash: Send + Sync + 'static + DeserializeOwned,

Collects all the methods and subscriptions defined in the trait and adds them into a single RpcModule.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<Block, Client> DevApiServer<<Block as Block>::Hash> for Dev<Block, Client>
where Block: BlockT + 'static, Client: BlockBackend<Block> + HeaderBackend<Block> + ProvideRuntimeApi<Block> + Send + Sync + 'static, Client::Api: Core<Block>,