pub trait TransactionBroadcastApiServer: Sized + Send + Sync + 'static {
    // Required methods
    fn broadcast<'life0, 'life1, 'async_trait>(
        &'life0 self,
        ext: &'life1 Extensions,
        bytes: Bytes
    ) -> Pin<Box<dyn Future<Output = RpcResult<Option<String>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn stop_broadcast<'life0, 'life1, 'async_trait>(
        &'life0 self,
        ext: &'life1 Extensions,
        operation_id: String
    ) -> Pin<Box<dyn Future<Output = Result<(), ErrorBroadcast>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;

    // Provided method
    fn into_rpc(self) -> RpcModule<Self> { ... }
}
Expand description

Server trait implementation for the TransactionBroadcastApi RPC API.

Required Methods§

source

fn broadcast<'life0, 'life1, 'async_trait>( &'life0 self, ext: &'life1 Extensions, bytes: Bytes ) -> Pin<Box<dyn Future<Output = RpcResult<Option<String>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Broadcast an extrinsic to the chain.

§Unstable

This method is unstable and subject to change in the future.

source

fn stop_broadcast<'life0, 'life1, 'async_trait>( &'life0 self, ext: &'life1 Extensions, operation_id: String ) -> Pin<Box<dyn Future<Output = Result<(), ErrorBroadcast>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Broadcast an extrinsic to the chain.

§Unstable

This method is unstable and subject to change in the future.

Provided Methods§

source

fn into_rpc(self) -> RpcModule<Self>

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<Pool, Client> TransactionBroadcastApiServer for TransactionBroadcast<Pool, Client>
where Pool: TransactionPool + Sync + Send + 'static, Pool::Error: IntoPoolError, <Pool::Block as BlockT>::Hash: Unpin, Client: HeaderBackend<Pool::Block> + BlockchainEvents<Pool::Block> + Send + Sync + 'static,