referrerpolicy=no-referrer-when-downgrade

Trait sc_rpc_api::dev::DevApiServer

source ·
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§

source

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§

source

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§