pub trait WireTx: Send + 'static {
type Error: Error;
// Required method
fn send(
&mut self,
data: Vec<u8>,
) -> impl Future<Output = Result<(), Self::Error>> + Send;
}
Expand description
Wire Transmit Interface
Responsible for taking a serialized frame (including header and payload), performing any further encoding if necessary, and transmitting to the device.
Should complete once the message is fully sent (e.g. not just enqueued) if possible.
All errors are treated as fatal - resolvable or ignorable errors should not be returned to the caller.
Required Associated Types§
Required 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.