Struct qwerty::ascii::Ascii[][src]

pub struct Ascii;

Sample a char, uniformly distributed over ASCII letters, numbers, and symbols: a-z, A-Z, 0-9 and !"#$%&'()*+,-./:;<=>?@`~[]{}^_| .

Example

use std::iter;
use rand::{Rng, thread_rng};
use qwerty::ascii::Ascii;

let mut rng = thread_rng();
let chars: String = iter::repeat(())
        .map(|()| rng.sample(Ascii))
        .take(7)
        .collect();
println!("Random chars: {}", chars);

Trait Implementations

impl Debug for Ascii
[src]

Formats the value using the given formatter. Read more

impl Distribution<char> for Ascii
[src]

Generate a random value of T, using rng as the source of randomness.

Create an iterator that generates random values of T, using rng as the source of randomness. Read more

Auto Trait Implementations

impl Send for Ascii

impl Sync for Ascii