referrerpolicy=no-referrer-when-downgrade
sc_rpc_spec_v2::transaction::api

Trait TransactionBroadcastApiServer

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

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<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,