pub trait FarmingApiServer<BlockHash, AssetId>: Sized + Send + Sync + 'static {
    // Required method
    fn reward_doubling_assets(
        &self,
        at: Option<BlockHash>
    ) -> RpcResult<Vec<AssetId>>;

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

Server trait implementation for the FarmingApi RPC API.

Required Methods§

source

fn reward_doubling_assets( &self, at: Option<BlockHash> ) -> RpcResult<Vec<AssetId>>

Provided Methods§

source

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

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

Implementors§

source§

impl<C, Block, AssetId> FarmingApiServer<<Block as Block>::Hash, AssetId> for FarmingClient<C, Block>where Block: BlockT, C: Send + Sync + 'static + ProvideRuntimeApi<Block> + HeaderBackend<Block>, C::Api: FarmingRuntimeApi<Block, AssetId>, AssetId: Codec,