/// Creates a new value generator from the given seed.
///
/// This generator is typically used with a hardcoded seed that is keyed on the input data
/// somehow. For example, for a test fixture it may be the name of the fixture.
Creates a new value generator from the given seed.
This generator is typically used with a hardcoded seed that is keyed on the input data
somehow. For example, for a test fixture it may be the name of the fixture.
Creates a new value generator from the given seed . This generator is typically used with a hardcoded seed that is keyed on the input data somehow . For example for a test fixture it may be the name of the fixture .
pub fn from_seed(seed: impl Hash) -> Self {
        // Convert the input seed into a 32-byte hash.
        let mut rng_seed = [0u8; 32];
        for hash_seed in 0usize..=3 {
            let mut hasher = XxHash64::with_seed(hash_seed as u64);
            seed.hash(&mut hasher);
            rng_seed[hash_seed..(hash_seed + 8)].copy_from_slice(&hasher.finish().to_be_bytes());
        }
        Self {
            runner: TestRunner::new_with_rng(
                Config::default(),
                TestRng::from_seed(RngAlgorithm::default(), &rng_seed),
            ),
        }
    }
pub fn from_seed ( seed : impl Hash ) -> Self { // Convert the input seed into a 32-byte hash. let mut rng_seed = [ 0u8 ; 32 ] ; for hash_seed in 0usize ..= 3 { let mut hasher = XxHash64 :: with_seed ( hash_seed as u64 ) ; seed . hash ( & mut hasher ) ; rng_seed [ hash_seed .. ( hash_seed + 8 ) ] . copy_from_slice ( & hasher . finish ( ) . to_be_bytes ( ) ) ; } Self { runner : TestRunner :: new_with_rng ( Config :: default ( ) , TestRng :: from_seed ( RngAlgorithm :: default ( ) , & rng_seed ) , ) , } }
Creates a new value generator from the given seed.
Creates a new value generator from the given seed .
seed
impl Hash