Trait centrifuge_chain::rpc::anchors::AnchorApiServer
source · pub trait AnchorApiServer<IdHash, BlockHash>: Sized + Send + Sync + 'static {
// Required method
fn get_anchor_by_id<'life0, 'async_trait>(
&'life0 self,
id: IdHash,
at: Option<BlockHash>
) -> Pin<Box<dyn Future<Output = RpcResult<AnchorData<IdHash, BlockNumber>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided method
fn into_rpc(self) -> RpcModule<Self>
where IdHash: Send + Sync + 'static + DeserializeOwned + Clone + Serialize,
BlockHash: Send + Sync + 'static + DeserializeOwned { ... }
}
Expand description
Server trait implementation for the AnchorApi
RPC API.
Required Methods§
sourcefn get_anchor_by_id<'life0, 'async_trait>(
&'life0 self,
id: IdHash,
at: Option<BlockHash>
) -> Pin<Box<dyn Future<Output = RpcResult<AnchorData<IdHash, BlockNumber>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_anchor_by_id<'life0, 'async_trait>(
&'life0 self,
id: IdHash,
at: Option<BlockHash>
) -> Pin<Box<dyn Future<Output = RpcResult<AnchorData<IdHash, BlockNumber>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
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 + Clone + Serialize,
BlockHash: Send + Sync + 'static + DeserializeOwned,
fn into_rpc(self) -> RpcModule<Self>where
IdHash: Send + Sync + 'static + DeserializeOwned + Clone + Serialize,
BlockHash: Send + Sync + 'static + DeserializeOwned,
Collects all the methods and subscriptions defined in the trait and adds them into a single RpcModule
.
Object Safety§
This trait is not object safe.