pub trait NetworkSend {
// Required method
async fn send_to(&mut self, data: &[u8], addr: Address) -> Result<(), Error>;
}Expand description
A trait for sending data to a network address.
All network communication in the Matter transport is packetized (including via TCP and Bluetooth), hence this trait models the sending of a single Matter packet of data to a network address.
Data packetization is expected to be handled by the implementation of this trait, and is trivial for e.g. the UDP transport which is packetized by default, but more complex for e.g. the TCP transport and especially for BTP.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".