pub struct Runner { /* private fields */ }Expand description
The per-run state a Strategy draws from: the random number generator
and the backend’s bookkeeping.
It wraps proptest’s TestRunner. The seam owns this type so the backend
does not appear in the property runner’s public signatures.
Implementations§
Source§impl Runner
impl Runner
Sourcepub fn deterministic() -> Runner
pub fn deterministic() -> Runner
A runner with a fixed, reproducible seed: the same sequence of generated values on every run.
This is the default behind for_all. A property test that
is reproducible cannot flake from the RNG: it passes or fails the same
way every time, in CI and on a laptop. A caller who wants a fresh seed
each run constructs one with Runner::randomized and passes it to
for_all_with.
Sourcepub fn randomized() -> Runner
pub fn randomized() -> Runner
A runner seeded from the environment, or randomly when the environment
says nothing, like a stock proptest run.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Runner
impl !RefUnwindSafe for Runner
impl Send for Runner
impl Sync for Runner
impl Unpin for Runner
impl UnsafeUnpin for Runner
impl !UnwindSafe for Runner
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