pub struct WildcardConstraints {
pub exclude: Vec<Expression>,
pub properties: Vec<fn(&Expression) -> bool>,
}Expand description
Constraints for wildcard pattern matching
Provides fine-grained control over what expressions a wildcard can match.
Fields§
§exclude: Vec<Expression>Expressions that cannot be matched (e.g., specific variables to exclude)
properties: Vec<fn(&Expression) -> bool>Predicates that must return true for a match to succeed Common examples: is_integer, is_positive, is_polynomial_in(x)
Implementations§
Source§impl WildcardConstraints
impl WildcardConstraints
Sourcepub fn with_exclude(exclude: Vec<Expression>) -> Self
pub fn with_exclude(exclude: Vec<Expression>) -> Self
Create constraints with excluded expressions
Sourcepub fn with_properties(properties: Vec<fn(&Expression) -> bool>) -> Self
pub fn with_properties(properties: Vec<fn(&Expression) -> bool>) -> Self
Create constraints with property predicates
Sourcepub fn is_satisfied_by(&self, expr: &Expression) -> bool
pub fn is_satisfied_by(&self, expr: &Expression) -> bool
Check if an expression satisfies all constraints
Trait Implementations§
Source§impl Clone for WildcardConstraints
impl Clone for WildcardConstraints
Source§fn clone(&self) -> WildcardConstraints
fn clone(&self) -> WildcardConstraints
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WildcardConstraints
impl Debug for WildcardConstraints
Source§impl PartialEq for WildcardConstraints
impl PartialEq for WildcardConstraints
Auto Trait Implementations§
impl Freeze for WildcardConstraints
impl RefUnwindSafe for WildcardConstraints
impl Send for WildcardConstraints
impl Sync for WildcardConstraints
impl Unpin for WildcardConstraints
impl UnwindSafe for WildcardConstraints
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more