sophia_api/term/matcher/_not.rs
1use super::*;
2
3/// Matches on the inverse of the inner [`Term`] or [`GraphName`]
4pub struct Not<M>(pub M);
5
6impl<M: TermMatcher> TermMatcher for Not<M> {
7 type Term = SimpleTerm<'static>; // not actually used
8
9 fn matches<T2: Term + ?Sized>(&self, term: &T2) -> bool {
10 !self.0.matches(term)
11 }
12}