Struct gabble::Gabble[][src]

pub struct Gabble {
    pub start: Syllable,
    pub end: Syllable,
    pub length: Option<usize>,
}
Expand description

Generator type used for generating custom variant of pseudo-word

Example

use gabble::Gabble;
use gabble::Syllable::{Alphabet, Consonant};
use rand::thread_rng;
let mut rng = thread_rng();
//Generator configured to generate words
//that starts with consonant syllable and ends with a number
let gabble = Gabble::new()
    .with_length(10)
    .starts_with(Alphabet)
    .ends_with(Consonant);
println!("customized answer to life is {}", gabble.generate(&mut rng));

Fields

start: Syllableend: Syllablelength: Option<usize>

Implementations

Trait Implementations

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.