Trait TpuConnection

Source
pub trait TpuConnection {
    // Required methods
    fn tpu_addr(&self) -> &SocketAddr;
    fn send_wire_transaction<'life0, 'async_trait, T>(
        &'life0 self,
        wire_transaction: T,
    ) -> Pin<Box<dyn Future<Output = TransportResult<()>> + Send + 'async_trait>>
       where T: AsRef<[u8]> + Send + Sync + 'async_trait,
             Self: 'async_trait,
             'life0: 'async_trait;
    fn send_wire_transaction_batch<'life0, 'life1, 'async_trait, T>(
        &'life0 self,
        buffers: &'life1 [T],
    ) -> Pin<Box<dyn Future<Output = TransportResult<()>> + Send + 'async_trait>>
       where T: AsRef<[u8]> + Send + Sync + 'async_trait,
             Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;

    // Provided method
    fn serialize_and_send_transaction<'life0, 'life1, 'async_trait>(
        &'life0 self,
        transaction: &'life1 VersionedTransaction,
    ) -> Pin<Box<dyn Future<Output = TransportResult<()>> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
}

Required Methods§

Source

fn tpu_addr(&self) -> &SocketAddr

Source

fn send_wire_transaction<'life0, 'async_trait, T>( &'life0 self, wire_transaction: T, ) -> Pin<Box<dyn Future<Output = TransportResult<()>> + Send + 'async_trait>>
where T: AsRef<[u8]> + Send + Sync + 'async_trait, Self: 'async_trait, 'life0: 'async_trait,

Source

fn send_wire_transaction_batch<'life0, 'life1, 'async_trait, T>( &'life0 self, buffers: &'life1 [T], ) -> Pin<Box<dyn Future<Output = TransportResult<()>> + Send + 'async_trait>>
where T: AsRef<[u8]> + Send + Sync + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Provided Methods§

Source

fn serialize_and_send_transaction<'life0, 'life1, 'async_trait>( &'life0 self, transaction: &'life1 VersionedTransaction, ) -> Pin<Box<dyn Future<Output = TransportResult<()>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

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§