pub struct WordList { /* private fields */ }
Expand description
WList is a simple word-list generator. It’s probably not what you came here for, but some name parts are best filled with a word-list. It supports weighted words, so that you can make common words appear more often.
Implementations§
source§impl WordList
impl WordList
sourcepub fn generate(&self, ws: &mut WorkingSet, rng: &mut impl Rng)
pub fn generate(&self, ws: &mut WorkingSet, rng: &mut impl Rng)
Generate a name. You need to provide your own WorkingSet and Rng, which is necessary to save on allocations. A dependent application should use the full name generator interface instead
sourcepub fn learn(&mut self, sample_set: &SampleSet) -> Result<(), LearnError>
pub fn learn(&mut self, sample_set: &SampleSet) -> Result<(), LearnError>
Learn learns samples from the sample set. The former state is copied and will be restored upon one of the samples failing to import.
pub fn fix_validation_issues(&mut self)
pub fn validate(&self) -> Result<(), ValidationError>
pub fn new() -> WordList
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for WordList
impl Send for WordList
impl Sync for WordList
impl Unpin for WordList
impl UnwindSafe for WordList
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