pub struct Wordlist(_);
Expand description
A list of Word
s
Implementations
sourceimpl Wordlist
impl Wordlist
sourcepub fn iter(&self) -> Iter<'_, Word>
pub fn iter(&self) -> Iter<'_, Word>
Returns an iterator over references to the words in the list.
sourcepub fn filter(
self,
constraints: &ConstraintSet
) -> impl Iterator<Item = Word> + '_
pub fn filter(
self,
constraints: &ConstraintSet
) -> impl Iterator<Item = Word> + '_
Returns an iterator over the words in the list that comply to the given constraints
.
sourcepub fn rank_words(&self) -> impl Iterator<Item = (&Word, usize)>
pub fn rank_words(&self) -> impl Iterator<Item = (&Word, usize)>
Ranks the words in the list by their filter_potential
and returns an iterator
over pairs of word references and scores. The return values are sorted by the score
in descending order. Two words with the same score will be sorted lexicographically.
Trait Implementations
sourceimpl FromIterator<Word> for Wordlist
impl FromIterator<Word> for Wordlist
sourcefn from_iter<I: IntoIterator<Item = Word>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = Word>>(iter: I) -> Self
Creates a value from an iterator. Read more
sourceimpl IntoIterator for Wordlist
impl IntoIterator for Wordlist
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more