diff --git a/libimagentryfilter/src/filter.rs b/libimagentryfilter/src/filter.rs index dd8128e4..2d0015a1 100644 --- a/libimagentryfilter/src/filter.rs +++ b/libimagentryfilter/src/filter.rs @@ -20,6 +20,12 @@ pub trait Filter { Or::new(Box::new(self), other) } + fn or_not(self, other: Box) -> Or + where Self: Sized + 'static + { + self.or(Box::new(Not::new(other))) + } + fn or3(self, other: Box, other2: Box) -> Or where Self: Sized + 'static { @@ -38,5 +44,11 @@ pub trait Filter { And::new(Box::new(self), Box::new(And::new(other, other2))) } + fn and_not(self, other: Box) -> And + where Self: Sized + 'static + { + self.and(Box::new(Not::new(other))) + } + }