referrerpolicy=no-referrer-when-downgrade
sc_rpc_spec_v2::chain_spec::api

Trait ChainSpecApiServer

Source
pub trait ChainSpecApiServer:
    Sized
    + Send
    + Sync
    + 'static {
    // Required methods
    fn chain_spec_v1_chain_name(&self) -> RpcResult<String>;
    fn chain_spec_v1_genesis_hash(&self) -> RpcResult<String>;
    fn chain_spec_v1_properties(&self) -> RpcResult<Properties>;

    // Provided method
    fn into_rpc(self) -> RpcModule<Self> { ... }
}
Expand description

Server trait implementation for the ChainSpecApi RPC API.

Required Methods§

Source

fn chain_spec_v1_chain_name(&self) -> RpcResult<String>

Get the chain name, as present in the chain specification.

Source

fn chain_spec_v1_genesis_hash(&self) -> RpcResult<String>

Get the chain’s genesis hash.

Source

fn chain_spec_v1_properties(&self) -> RpcResult<Properties>

Get the properties of the chain, as present in the chain specification.

§Note

The json whitespaces are not guaranteed to persist.

Provided Methods§

Source

fn into_rpc(self) -> RpcModule<Self>

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

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.

Implementors§