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: IpAddr
Source IP address.
src_port: u16
Source Port.
dst_ip: IpAddr
Destination IP address.
dst_port: u16
Destination Port.
payload: Vec<u8>
Payload.
Implementations§
Source§impl UdpPacketBuilder
impl UdpPacketBuilder
Sourcepub fn new(src_addr: SocketAddr, dst_addr: SocketAddr) -> UdpPacketBuilder
pub fn new(src_addr: SocketAddr, dst_addr: SocketAddr) -> UdpPacketBuilder
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 Freeze for UdpPacketBuilder
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