use libimagstore::store::Entry; pub use ops::and::And; pub use ops::not::Not; pub use ops::or::Or; pub trait Filter { fn filter(&self, &Entry) -> bool; fn not(self) -> Not where Self: Sized + 'static { Not::new(Box::new(self)) } fn or(self, other: Box) -> Or where Self: Sized + 'static { 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 { Or::new(Box::new(self), Box::new(Or::new(other, other2))) } fn and(self, other: Box) -> And where Self: Sized + 'static { And::new(Box::new(self), other) } fn and3(self, other: Box, other2: Box) -> And where Self: Sized + 'static { 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))) } }