pub struct Mask { /* private fields */ }Expand description
Implementations
sourceimpl Mask
impl Mask
pub fn parse(s: &str) -> Self
pub fn parse_with_stage(s: &str, stage: Stage) -> Result<Self, ParseError>
sourcepub fn from_pattern(pattern: &Pattern) -> Result<Self, MultipleStars>
pub fn from_pattern(pattern: &Pattern) -> Result<Self, MultipleStars>
sourcepub fn fix_bells(
stage: Stage,
fixed_bells: impl IntoIterator<Item = Bell>
) -> Self
pub fn fix_bells(
stage: Stage,
fixed_bells: impl IntoIterator<Item = Bell>
) -> Self
sourcepub unsafe fn fix_unchecked(&mut self, b: Bell)
pub unsafe fn fix_unchecked(&mut self, b: Bell)
sourcepub fn unspecified_places(&self) -> impl Iterator<Item = usize> + '_
pub fn unspecified_places(&self) -> impl Iterator<Item = usize> + '_
Returns an Iterator over the indices of locations where this Mask contains an x
sourcepub fn set_bell(&mut self, bell: Bell, place: usize) -> Result<(), BellAlreadySet>
pub fn set_bell(&mut self, bell: Bell, place: usize) -> Result<(), BellAlreadySet>
Updates this Mask so that a given Bell is required at a given place.
sourcepub unsafe fn set_bell_unchecked(&mut self, bell: Bell, place: usize)
pub unsafe fn set_bell_unchecked(&mut self, bell: Bell, place: usize)
pub fn is_empty(&self) -> bool
sourcepub fn is_subset_of(&self, other: &Mask) -> bool
pub fn is_subset_of(&self, other: &Mask) -> bool
Returns true if the set of Rows satisfying self is a subset of those satisfying
other. This implies that self is ‘stricter’ than other; for example, xx3456 is a
subset of xxxx56.
sourcepub fn is_strict_subset_of(&self, other: &Mask) -> bool
pub fn is_strict_subset_of(&self, other: &Mask) -> bool
Returns true if the set of Rows satisfying self is a strict subset of those
satisfying other.
sourcepub fn is_compatible_with(&self, other: &Mask) -> bool
pub fn is_compatible_with(&self, other: &Mask) -> bool
Check if there exist any Rows which can satisfy both Masks (i.e. the two Masks are
‘compatible’). a.is_compatible_with(b) equivalent to (but faster than)
a.combine(b).is_some().
Trait Implementations
sourceimpl Ord for Mask
impl Ord for Mask
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialOrd<Mask> for Mask
impl PartialOrd<Mask> for Mask
sourcefn partial_cmp(&self, other: &Mask) -> Option<Ordering>
fn partial_cmp(&self, other: &Mask) -> Option<Ordering>
This method returns an ordering between self and other values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
impl Eq for Mask
impl StructuralEq for Mask
impl StructuralPartialEq for Mask
Auto Trait Implementations
impl RefUnwindSafe for Mask
impl Send for Mask
impl Sync for Mask
impl Unpin for Mask
impl UnwindSafe for Mask
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
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key and return true if they are equal.
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more