pub struct LinkConfig {
pub latency_ticks: u64,
pub drop_probability: f64,
pub jitter_ticks: u64,
pub reorder: bool,
pub duplicate_probability: f64,
pub corrupt_probability: f64,
pub bandwidth_limit: u64,
}Expand description
Configuration for a simulated network link between two nodes.
Fields§
§latency_ticks: u64One-way latency in simulated ticks.
drop_probability: f64Drop probability (0.0 = never, 1.0 = always).
jitter_ticks: u64Jitter in ticks: delivery = latency ± rand(0..jitter).
reorder: boolIf true, messages may be reordered due to jitter.
duplicate_probability: f64Probability that a message is delivered twice.
corrupt_probability: f64Probability that a message is corrupted (random byte flip).
bandwidth_limit: u64Maximum messages per tick on this link (0 = unlimited).
Trait Implementations§
Source§impl Clone for LinkConfig
impl Clone for LinkConfig
Source§fn clone(&self) -> LinkConfig
fn clone(&self) -> LinkConfig
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 moreSource§impl Debug for LinkConfig
impl Debug for LinkConfig
Auto Trait Implementations§
impl Freeze for LinkConfig
impl RefUnwindSafe for LinkConfig
impl Send for LinkConfig
impl Sync for LinkConfig
impl Unpin for LinkConfig
impl UnsafeUnpin for LinkConfig
impl UnwindSafe for LinkConfig
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