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§
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<()>
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<()>
fn par_serialize_and_send_transaction_batch( &self, transactions: &[VersionedTransaction], ) -> TransportResult<()>
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.