Function suppositions::generators::collections [] [src]

pub fn collections<C, G: Generator>(item: G) -> CollectionGenerator<C, G> where
    C: Extend<G::Item>, 

Generates a collection of the given type, populated with elements from the item generator.

To generate values of BTreeSet:

use std::collections::BTreeSet;
use suppositions::generators::*;
let gen = collections::<BTreeSet<_>, _>(u8s());