pub struct ReproducibleContext {
pub seed: u64,
pub rng: Rng,
pub audit_trail: Vec<String>,
}Expand description
Reproducible context: fixed-seed RNG with audit trail.
Fields§
§seed: u64Initial seed used to initialize the RNG.
rng: RngPseudo-random number generator.
audit_trail: Vec<String>Log of operations performed.
Implementations§
Source§impl ReproducibleContext
impl ReproducibleContext
Sourcepub fn new(seed: u64) -> ReproducibleContext
pub fn new(seed: u64) -> ReproducibleContext
Creates a new reproducible context with the given seed.
Sourcepub fn fork(&self, sub_seed: u64) -> ReproducibleContext
pub fn fork(&self, sub_seed: u64) -> ReproducibleContext
Creates a child context derived from the current seed and sub_seed.
Sourcepub fn audit_summary(&self) -> String
pub fn audit_summary(&self) -> String
Returns a human-readable summary of the audit trail.
Trait Implementations§
Source§impl Clone for ReproducibleContext
impl Clone for ReproducibleContext
Source§fn clone(&self) -> ReproducibleContext
fn clone(&self) -> ReproducibleContext
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ReproducibleContext
impl RefUnwindSafe for ReproducibleContext
impl Send for ReproducibleContext
impl Sync for ReproducibleContext
impl Unpin for ReproducibleContext
impl UnsafeUnpin for ReproducibleContext
impl UnwindSafe for ReproducibleContext
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