Struct xenet_packet_builder::udp::UdpPacketBuilder
source · pub struct UdpPacketBuilder {
pub src_ip: IpAddr,
pub src_port: u16,
pub dst_ip: IpAddr,
pub dst_port: u16,
pub payload: Vec<u8>,
}Expand description
UDP Packet Builder.
Fields§
§src_ip: IpAddrSource IP address.
src_port: u16Source Port.
dst_ip: IpAddrDestination IP address.
dst_port: u16Destination Port.
payload: Vec<u8>Payload.
Implementations§
source§impl UdpPacketBuilder
impl UdpPacketBuilder
sourcepub fn new(src_addr: SocketAddr, dst_addr: SocketAddr) -> Self
pub fn new(src_addr: SocketAddr, dst_addr: SocketAddr) -> Self
Constructs a new UdpPacketBuilder.
Trait Implementations§
source§impl Clone for UdpPacketBuilder
impl Clone for UdpPacketBuilder
source§fn clone(&self) -> UdpPacketBuilder
fn clone(&self) -> UdpPacketBuilder
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 moreAuto Trait Implementations§
impl RefUnwindSafe for UdpPacketBuilder
impl Send for UdpPacketBuilder
impl Sync for UdpPacketBuilder
impl Unpin for UdpPacketBuilder
impl UnwindSafe for UdpPacketBuilder
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more