pub struct Builder { /* private fields */ }Expand description
Configure the simulation
Implementations
sourceimpl Builder
impl Builder
pub fn new() -> Self
sourcepub fn simulation_duration(&mut self, value: Duration) -> &mut Self
pub fn simulation_duration(&mut self, value: Duration) -> &mut Self
How long the test should run for in simulated time
sourcepub fn tick_duration(&mut self, value: Duration) -> &mut Self
pub fn tick_duration(&mut self, value: Duration) -> &mut Self
How much simulated time should elapse each tick.
sourcepub fn rng(&mut self, rng: impl RngCore + 'static) -> &mut Self
pub fn rng(&mut self, rng: impl RngCore + 'static) -> &mut Self
Set the random number generator used to fuzz
pub fn min_message_latency(&mut self, value: Duration) -> &mut Self
pub fn max_message_latency(&mut self, value: Duration) -> &mut Self
pub fn fail_rate(&mut self, value: f64) -> &mut Self
pub fn repair_rate(&mut self, value: f64) -> &mut Self
pub fn build<'a>(&self) -> Sim<'a>
pub fn build_with_rng<'a>(&self, rng: Box<dyn RngCore>) -> Sim<'a>
Auto Trait Implementations
impl !RefUnwindSafe for Builder
impl !Send for Builder
impl !Sync for Builder
impl Unpin for Builder
impl !UnwindSafe for Builder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more