pub struct UdpMocker {
pub socket_addr: SocketAddr,
pub net_timeout: Duration,
pub rx_timeout: Duration,
pub max_packet_size: usize,
}
Expand description
Options for the UDP server mocker
Fields§
§socket_addr: SocketAddr
Socket address on which the server will listen. Will be set to 127.0.0.1:0
by default.
net_timeout: Duration
Timeout for the server to wait for a message from the client.
rx_timeout: Duration
Timeout if no more instruction is available and Instruction::StopExchange
hasn’t been sent
max_packet_size: usize
Maximum size of a UDP packet in bytes, specified in RFC 768
Trait Implementations§
Auto Trait Implementations§
impl Freeze for UdpMocker
impl RefUnwindSafe for UdpMocker
impl Send for UdpMocker
impl Sync for UdpMocker
impl Unpin for UdpMocker
impl UnwindSafe for UdpMocker
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