pub struct ReporterHarness { /* private fields */ }Expand description
Owns the channels and sink needed to build a Reporter for tests.
The matching event receiver and command sender are kept alive for the
harness’s lifetime, so a reporter built from Self::reporter never
sees a spurious disconnect while emitting facts.
Implementations§
Source§impl ReporterHarness
impl ReporterHarness
Sourcepub fn reporter(&mut self, step: StepId) -> Reporter<'_>
pub fn reporter(&mut self, step: StepId) -> Reporter<'_>
Build a reporter scoped to the given step. The reporter borrows the harness for its lifetime.
The entropy source is seeded with a fixed test seed, mirroring the
runner, so actions that draw values (serials, nonces) work out of the
box. Tests that need a specific seed can call
Reporter::seed_entropy again.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ReporterHarness
impl RefUnwindSafe for ReporterHarness
impl Send for ReporterHarness
impl Sync for ReporterHarness
impl Unpin for ReporterHarness
impl UnsafeUnpin for ReporterHarness
impl UnwindSafe for ReporterHarness
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