pub trait HandlesApiServer<BlockHash>: Sized + Send + Sync + 'static {
    // Required methods
    fn get_handle_for_msa(
        &self,
        msa_id: MessageSourceId
    ) -> RpcResult<Option<HandleResponse>>;
    fn get_next_suffixes(
        &self,
        base_handle: String,
        count: Option<u16>
    ) -> RpcResult<PresumptiveSuffixesResponse>;
    fn get_msa_for_handle(
        &self,
        display_handle: String
    ) -> RpcResult<Option<MessageSourceId>>;
    fn validate_handle(&self, base_handle: String) -> RpcResult<bool>;

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

Server trait implementation for the HandlesApi RPC API.

Required Methods§

source

fn get_handle_for_msa( &self, msa_id: MessageSourceId ) -> RpcResult<Option<HandleResponse>>

retrieve HandleResponse for a given MessageSourceId

source

fn get_next_suffixes( &self, base_handle: String, count: Option<u16> ) -> RpcResult<PresumptiveSuffixesResponse>

retrieve next n suffixes for a given handle

source

fn get_msa_for_handle( &self, display_handle: String ) -> RpcResult<Option<MessageSourceId>>

retrieve MessageSourceId for a given handle

source

fn validate_handle(&self, base_handle: String) -> RpcResult<bool>

validate a handle

Provided Methods§

source

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

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> HandlesApiServer<<Block as Block>::Hash> for HandlesHandler<C, Block>
where Block: BlockT, C: Send + Sync + 'static + ProvideRuntimeApi<Block> + HeaderBackend<Block>, C::Api: HandlesRuntimeApi<Block>,