pub trait TransportSenderT: 'static {
type Error: Error + Send + Sync;
// Required method
fn send(
&mut self,
msg: String,
) -> impl Future<Output = Result<(), Self::Error>> + MaybeSend;
// Provided methods
fn send_ping(
&mut self,
) -> impl Future<Output = Result<(), Self::Error>> + MaybeSend { ... }
fn close(
&mut self,
) -> impl Future<Output = Result<(), Self::Error>> + MaybeSend { ... }
}
Available on crate feature
client
only.Expand description
Transport interface to send data asynchronous.
Required Associated Types§
Required Methods§
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.