pub struct DeterminismFixture { /* private fields */ }Expand description
Shared deterministic fixture for a test run.
Implementations§
Source§impl DeterminismFixture
impl DeterminismFixture
Sourcepub fn new(prefix: &str, default_seed: u64) -> Self
pub fn new(prefix: &str, default_seed: u64) -> Self
Create a fixture with a stable run id and seed.
Sourcepub fn new_with(
prefix: &str,
seed: u64,
deterministic: bool,
time_step_ms: u64,
) -> Self
pub fn new_with( prefix: &str, seed: u64, deterministic: bool, time_step_ms: u64, ) -> Self
Create a fixture with explicit configuration (used by tests).
Sourcepub fn deterministic(&self) -> bool
pub fn deterministic(&self) -> bool
True when deterministic mode is enabled.
Sourcepub fn timestamp(&self) -> String
pub fn timestamp(&self) -> String
Return a deterministic timestamp string (or wall time if disabled).
Sourcepub fn env_snapshot(&self) -> EnvSnapshot
pub fn env_snapshot(&self) -> EnvSnapshot
Capture environment fields for logging.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for DeterminismFixture
impl RefUnwindSafe for DeterminismFixture
impl Send for DeterminismFixture
impl Sync for DeterminismFixture
impl Unpin for DeterminismFixture
impl UnsafeUnpin for DeterminismFixture
impl UnwindSafe for DeterminismFixture
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