1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
use super::ToSharedPredicate; #[derive(Clone, Debug)] pub struct ExcludePredicate { pub predicate: super::SharedPredicate } pub trait ToExcludePredicate { fn exclude(&self) -> super::SharedPredicate; } impl super::Predicate for ExcludePredicate {} impl ToExcludePredicate for super::SharedPredicate { fn exclude(&self) -> super::SharedPredicate { ExcludePredicate{predicate: self.clone()}.upcast() } }