pub struct NetworkConfig {
pub host: String,
pub port: u16,
pub latency_ms: u32,
pub packet_loss_prob: f32,
pub recv_buffer_size: usize,
pub endpoint: String,
}Expand description
Configuration for the network connection.
Fields§
§host: StringHostname or IP address to connect to.
port: u16TCP port to connect to.
latency_ms: u32Simulated round-trip latency in milliseconds (0 = no simulation).
packet_loss_prob: f32Packet loss probability [0.0 = no loss, 1.0 = always lost].
recv_buffer_size: usizeMaximum receive buffer size (packets).
endpoint: StringHuman-readable endpoint string (derived from host:port by default).
Trait Implementations§
Source§impl Clone for NetworkConfig
impl Clone for NetworkConfig
Source§fn clone(&self) -> NetworkConfig
fn clone(&self) -> NetworkConfig
Returns a duplicate 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 NetworkConfig
impl RefUnwindSafe for NetworkConfig
impl Send for NetworkConfig
impl Sync for NetworkConfig
impl Unpin for NetworkConfig
impl UnsafeUnpin for NetworkConfig
impl UnwindSafe for NetworkConfig
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