tests_fuzz::generator

Trait Random

Source
pub trait Random<T, R: Rng> {
    // Required method
    fn choose(&self, rng: &mut R, amount: usize) -> Vec<T>;

    // Provided method
    fn gen(&self, rng: &mut R) -> T { ... }
}

Required Methods§

Source

fn choose(&self, rng: &mut R, amount: usize) -> Vec<T>

Uniformly sample amount distinct elements.

Provided Methods§

Source

fn gen(&self, rng: &mut R) -> T

Generates a random element.

Implementors§