pub struct Network {
pub seed: u64,
pub max_delay: u64,
pub loss_per_mille: u16,
pub topology: Topology,
pub partitions: Vec<Partition>,
}Expand description
How the simulated network behaves.
Fields§
§seed: u64Seeds every random choice: delays and losses.
max_delay: u64The most extra ticks a message may take, on top of the one tick every message takes.
loss_per_mille: u16The chance, per mille, that one copy of a broadcast is lost. 0 is lossless; 1000 or more loses everything.
topology: TopologyWhich agents can reach each other at all.
partitions: Vec<Partition>Intervals in which groups of agents cannot reach each other.
Trait Implementations§
impl Eq for Network
impl StructuralPartialEq for Network
Auto Trait Implementations§
impl Forget for Network
impl Freeze for Network
impl Move for Network
impl RefUnwindSafe for Network
impl Send for Network
impl Sync for Network
impl Unpin for Network
impl UnsafeUnpin for Network
impl UnwindSafe for Network
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