pallet_handles_rpc

Trait HandlesApiServer

Source
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.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so 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>,