pub enum Combinator {
Matcher(Arc<dyn Matcher + Sync>),
Not(Box<Combinator>),
And(Box<Combinator>, Box<Combinator>),
Or(Box<Combinator>, Box<Combinator>),
}
Expand description
Combines several matches together
It implements normal boolean algebra
! comb
will negate the combinatorcomb1 & comb2
both should passcomb1 | comb2
at least one should pass
Variants§
Matcher(Arc<dyn Matcher + Sync>)
Represents the actual underlying matcher
Not(Box<Combinator>)
Negates the expression
And(Box<Combinator>, Box<Combinator>)
Both expressions should be valid
Or(Box<Combinator>, Box<Combinator>)
At least one of the expressions should be valid
Implementations§
Trait Implementations§
Source§impl BitAnd for Combinator
impl BitAnd for Combinator
Source§impl BitOr for Combinator
impl BitOr for Combinator
Source§impl Clone for Combinator
impl Clone for Combinator
Source§fn clone(&self) -> Combinator
fn clone(&self) -> Combinator
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for Combinator
impl Debug for Combinator
Source§impl Matcher for Combinator
impl Matcher for Combinator
Source§fn match_path(&self, path: &Path, kind: ParsedKind) -> bool
fn match_path(&self, path: &Path, kind: ParsedKind) -> bool
Check whether the path matches Read more
Auto Trait Implementations§
impl Freeze for Combinator
impl !RefUnwindSafe for Combinator
impl Send for Combinator
impl Sync for Combinator
impl Unpin for Combinator
impl !UnwindSafe for Combinator
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