Struct quickcheck::StdGen [−][src]
pub struct StdGen<R> { /* fields omitted */ }
StdGen is the default implementation of Gen
.
Values of type StdGen
can be created with the gen
function in this
crate.
Methods
impl<R: RngCore> StdGen<R>
[src]
impl<R: RngCore> StdGen<R>
pub fn new(rng: R, size: usize) -> StdGen<R>
[src]
pub fn new(rng: R, size: usize) -> StdGen<R>
Returns a StdGen
with the given configuration using any random number
generator.
The size
parameter controls the size of random values generated. For
example, it specifies the maximum length of a randomly generated vector
and also will specify the maximum magnitude of a randomly generated
number.
Trait Implementations
impl<R: RngCore> RngCore for StdGen<R>
[src]
impl<R: RngCore> RngCore for StdGen<R>
fn next_u32(&mut self) -> u32
[src]
fn next_u32(&mut self) -> u32
Return the next random u32
. Read more
fn next_u64(&mut self) -> u64
[src]
fn next_u64(&mut self) -> u64
Return the next random u64
. Read more
fn fill_bytes(&mut self, dest: &mut [u8])
[src]
fn fill_bytes(&mut self, dest: &mut [u8])
Fill dest
with random data. Read more
fn try_fill_bytes(&mut self, dest: &mut [u8]) -> Result<(), Error>
[src]
fn try_fill_bytes(&mut self, dest: &mut [u8]) -> Result<(), Error>
Fill dest
entirely with random data. Read more
impl<R: RngCore> Gen for StdGen<R>
[src]
impl<R: RngCore> Gen for StdGen<R>