Trait centrifuge_chain::rpc::anchors::AnchorApiServer
source · pub trait AnchorApiServer<IdHash, BlockHash>: Sized + Send + Sync + 'static {
// Required method
fn get_anchor_by_id(
&self,
id: IdHash,
at: Option<BlockHash>
) -> RpcResult<AnchorData<IdHash, BlockNumber>>;
// Provided method
fn into_rpc(self) -> RpcModule<Self>
where IdHash: Send + Sync + 'static + DeserializeOwned + Serialize,
BlockHash: Send + Sync + 'static + DeserializeOwned { ... }
}
Expand description
Server trait implementation for the AnchorApi
RPC API.
Required Methods§
sourcefn get_anchor_by_id(
&self,
id: IdHash,
at: Option<BlockHash>
) -> RpcResult<AnchorData<IdHash, BlockNumber>>
fn get_anchor_by_id( &self, id: IdHash, at: Option<BlockHash> ) -> RpcResult<AnchorData<IdHash, BlockNumber>>
Returns an anchor given an anchor id from the runtime storage
Provided Methods§
sourcefn into_rpc(self) -> RpcModule<Self>where
IdHash: Send + Sync + 'static + DeserializeOwned + Serialize,
BlockHash: Send + Sync + 'static + DeserializeOwned,
fn into_rpc(self) -> RpcModule<Self>where IdHash: Send + Sync + 'static + DeserializeOwned + Serialize, BlockHash: Send + Sync + 'static + DeserializeOwned,
Collects all the methods and subscriptions defined in the trait and adds them into a single RpcModule
.