Struct futures_ringbuf::Dictator [−][src]
pub struct Dictator { /* fields omitted */ }
Expand description
Dictator that makes random decisions based on a seed. That is the decisions are reproducible. For reproducible decisions, your use of the dictator must be deterministic.
Implementations
Birth place of all dictators. This method will log the seed with log::trace. Make sure you turn on logging for the futures_ringbuf crate so you can reproduce failing tests.
Ask the dictator permission to do something.
pub fn pick<Idx: SampleUniform + Debug + Copy + PartialOrd>(
&mut self,
what: &str,
range: Range<Idx>
) -> Idx
[src]
pub fn pick<Idx: SampleUniform + Debug + Copy + PartialOrd>(
&mut self,
what: &str,
range: Range<Idx>
) -> Idx
[src]Ask the dictator to pick from a range of values.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Dictator
impl UnwindSafe for Dictator