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§

source

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§

source

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.

Implementors§

source§

impl<C, Block> AnchorApiServer<<BlakeTwo256 as Hash>::Output, <Block as Block>::Hash> for Anchors<C, Block>
where Block: BlockT, C: Send + Sync + 'static + ProvideRuntimeApi<Block> + HeaderBackend<Block>, C::Api: AnchorRuntimeApi<Block, Hash, BlockNumber>,