pub trait HasRng<Rng>where
Rng: Rng,{
// Required methods
fn rng(&mut self) -> &mut Rng;
fn swap_rng(&mut self, rng: &mut Rng);
}
Expand description
Required Methods§
sourcefn rng(&mut self) -> &mut Rng
fn rng(&mut self) -> &mut Rng
Access RNG
If, for some reason, you want access to the internal random number generator: Here you go
sourcefn swap_rng(&mut self, rng: &mut Rng)
fn swap_rng(&mut self, rng: &mut Rng)
If you need to exchange the internal rng
- swaps internal random number generator with
rng