Struct qwerty::diceware::diceware_distribution::Diceware[][src]

pub struct Diceware;

Sample a word, uniformly distributed over the standard diceware list:

The complete list contains 7776 short words, abbreviations and easy-to-remember character strings. The average length of each word is about 4.2 characters. The biggest words are six characters long.

Example

use std::iter;
use rand::{Rng, thread_rng};
use qwerty::diceware::Diceware;

let mut rng = thread_rng();
let words: Vec<&'static [u8]> = iter::repeat(())
        .map(|()| rng.sample(Diceware))
        .take(7)
        .collect();
println!("Random words: {:?}", words);

Trait Implementations

impl Debug for Diceware
[src]

Formats the value using the given formatter. Read more

impl Distribution<&'static [u8]> for Diceware
[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 Diceware

impl Sync for Diceware