Struct haikunator::Haikunator [] [src]

pub struct Haikunator<'a> {
    pub adjectives: &'a [&'a str],
    pub nouns: &'a [&'a str],
    pub delimiter: &'a str,
    pub token_length: usize,
    pub token_hex: bool,
    pub token_chars: &'a str,
}

The Haikunator type Holds settings and data that will be used when haikunate is called.

Examples

use haikunator::Haikunator;

let h = Haikunator {
    adjectives: &["flying", "bubbly"],
    nouns: &["bat", "soda"],
    delimiter: "-",
    token_length: 8,
    token_hex: false,
    token_chars: "0123456789忠犬ハチ公"
};

Note: If token_hex is true, the value of token_chars is ignored.

Fields

Methods

impl<'a> Haikunator<'a>
[src]

Generates random heroku-like short names using a combination

Examples

use haikunator::Haikunator;

let h = Haikunator::default();
println!("{:?}", h.haikunate());

Trait Implementations

impl<'a> Debug for Haikunator<'a>
[src]

Formats the value using the given formatter.

impl<'a> Default for Haikunator<'a>
[src]

Constructs a new Haikunator with default values.

Examples

use haikunator::Haikunator;

let h = Haikunator::default();