safecoin_client::tpu_connection

Trait TpuConnection

Source
pub trait TpuConnection {
    // Required methods
    fn tpu_addr(&self) -> &SocketAddr;
    fn send_wire_transaction_async(
        &self,
        wire_transaction: Vec<u8>,
    ) -> TransportResult<()>;
    fn send_wire_transaction_batch<T>(
        &self,
        buffers: &[T],
    ) -> TransportResult<()>
       where T: AsRef<[u8]> + Send + Sync;
    fn send_wire_transaction_batch_async(
        &self,
        buffers: Vec<Vec<u8>>,
    ) -> TransportResult<()>;

    // Provided methods
    fn serialize_and_send_transaction(
        &self,
        transaction: &VersionedTransaction,
    ) -> TransportResult<()> { ... }
    fn send_wire_transaction<T>(
        &self,
        wire_transaction: T,
    ) -> TransportResult<()>
       where T: AsRef<[u8]> + Send + Sync { ... }
    fn par_serialize_and_send_transaction_batch(
        &self,
        transactions: &[VersionedTransaction],
    ) -> TransportResult<()> { ... }
}

Required Methods§

Source

fn tpu_addr(&self) -> &SocketAddr

Source

fn send_wire_transaction_async( &self, wire_transaction: Vec<u8>, ) -> TransportResult<()>

Source

fn send_wire_transaction_batch<T>(&self, buffers: &[T]) -> TransportResult<()>
where T: AsRef<[u8]> + Send + Sync,

Source

fn send_wire_transaction_batch_async( &self, buffers: Vec<Vec<u8>>, ) -> TransportResult<()>

Provided Methods§

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§