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
adjectives: &'a [&'a str]
nouns: &'a [&'a str]
delimiter: &'a str
token_length: usize
token_hex: bool
token_chars: &'a str
Methods
impl<'a> Haikunator<'a>
[src]
fn haikunate(&self) -> String
Generates random heroku-like short names using a combination
Examples
use haikunator::Haikunator; let h = Haikunator::default(); println!("{:?}", h.haikunate());