Trait sc_rpc::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§
sourcefn block_stats(
&self,
ext: &Extensions,
block_hash: Hash,
) -> Result<Option<BlockStats>, Error>
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§
Object Safety§
This trait is not object safe.