pub trait BlockProducerMetadataRpcApiServer<Metadata>:
Sized
+ Send
+ Sync
+ 'static {
// Required method
fn get_block_producer_metadata(
&self,
cross_chain_public_key: CrossChainPublicKey,
) -> RpcResult<Option<Metadata>>;
// Provided method
fn into_rpc(self) -> RpcModule<Self>
where Metadata: Send + Sync + 'static + Clone + Serialize { ... }
}
Expand description
Server trait implementation for the BlockProducerMetadataRpcApi
RPC API.
Required Methods§
Sourcefn get_block_producer_metadata(
&self,
cross_chain_public_key: CrossChainPublicKey,
) -> RpcResult<Option<Metadata>>
fn get_block_producer_metadata( &self, cross_chain_public_key: CrossChainPublicKey, ) -> RpcResult<Option<Metadata>>
Returns JSON-encoded metadata for given cross_chain_public_key
from the storage of the current tip if it exists.
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.