pub trait CharacterChooser {
    // Required methods
    fn which_char(&mut self, guac: &mut Guacamole) -> char;
    fn whole_string(&mut self, bytes: &mut [u8]) -> String;
}
Expand description

Generate strings of a given alphabet using the provided randomness.

Required Methods§

source

fn which_char(&mut self, guac: &mut Guacamole) -> char

Generate a single char according to the distribution, using guac.

source

fn whole_string(&mut self, bytes: &mut [u8]) -> String

Generate a string equal in length to bytes, using each character of bytes as a random value to pick another character. NOTE(rescrv): This implies the CharacterChooser API only supports 256 distinct characters at a time, and I’m OK with that.

Implementors§