Struct udpsocket2::UdpDatagram
source · pub struct UdpDatagram {
pub peer: SocketAddr,
pub data: Vec<u8>,
}
Expand description
An individual UDP datagram, either having been received or to be sent over a UDP socket.
Fields§
§peer: SocketAddr
The peer for this datagram: if it was received, the source, if it is to be sent, the destination.
data: Vec<u8>
The data content of the datagram.
Trait Implementations§
source§impl Clone for UdpDatagram
impl Clone for UdpDatagram
source§fn clone(&self) -> UdpDatagram
fn clone(&self) -> UdpDatagram
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more