Struct prompter::ConstraintSet
source · [−]pub struct ConstraintSet { /* private fields */ }
Expand description
A set of Constraint
s that can be used to filter the Word
s in a Wordlist
Implementations
sourceimpl ConstraintSet
impl ConstraintSet
sourcepub fn iter(&self) -> Iter<'_, Constraint>
pub fn iter(&self) -> Iter<'_, Constraint>
Returns an iterator over the constraints in the set.
sourcepub fn is_match(&self, word: &Word) -> bool
pub fn is_match(&self, word: &Word) -> bool
Returns true if the given word
complies to all the constraints in the set.
sourcepub fn correct_word(&self) -> bool
pub fn correct_word(&self) -> bool
Returns true
if the ConstraintSet
encodes a correct guess, i.e. all the characters
are at the correct position (corresponds to the code GGGGG
).
Trait Implementations
sourceimpl Debug for ConstraintSet
impl Debug for ConstraintSet
sourceimpl Hash for ConstraintSet
impl Hash for ConstraintSet
sourceimpl IntoIterator for ConstraintSet
impl IntoIterator for ConstraintSet
type Item = Constraint
type Item = Constraint
The type of the elements being iterated over.
type IntoIter = IntoIter<Constraint, Global>
type IntoIter = IntoIter<Constraint, Global>
Which kind of iterator are we turning this into?
sourceimpl<'a> IntoIterator for &'a ConstraintSet
impl<'a> IntoIterator for &'a ConstraintSet
type Item = &'a Constraint
type Item = &'a Constraint
The type of the elements being iterated over.
type IntoIter = Iter<'a, Constraint>
type IntoIter = Iter<'a, Constraint>
Which kind of iterator are we turning this into?
sourceimpl PartialEq<ConstraintSet> for ConstraintSet
impl PartialEq<ConstraintSet> for ConstraintSet
sourcefn eq(&self, other: &ConstraintSet) -> bool
fn eq(&self, other: &ConstraintSet) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &ConstraintSet) -> bool
fn ne(&self, other: &ConstraintSet) -> bool
This method tests for !=
.
impl Eq for ConstraintSet
impl StructuralEq for ConstraintSet
impl StructuralPartialEq for ConstraintSet
Auto Trait Implementations
impl RefUnwindSafe for ConstraintSet
impl Send for ConstraintSet
impl Sync for ConstraintSet
impl Unpin for ConstraintSet
impl UnwindSafe for ConstraintSet
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