Function string_generator::gen_string [] [src]

pub fn gen_string<'a, P, R>(
    cat: &HashMap<String, &'a [u8]>,
    pat: P,
    rng: &mut R
) -> Result<String, GenStringError> where
    P: IntoIterator<Item = String>,
    R: Rng

Generate a string from a set of catagories, a pattern, and a random number generator. The patterns are scanned through one at a time, then used to pull a slice out of the hashmap. An entry from this is then reandomly selected, and turned into a character. These are all combined into a string and returned. Should an error occur, an instance of GenStringError will be returned.