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: Syllable
§end: Syllable
§length: Option<usize>
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Gabble
impl RefUnwindSafe for Gabble
impl Send for Gabble
impl Sync for Gabble
impl Unpin for Gabble
impl UnwindSafe for Gabble
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more