pub trait Specification<T>: Send + Sync {
// Required method
fn is_satisfied_by(&self, t: &T) -> bool;
// Provided methods
fn and<S>(self, other: S) -> AndSpec<Self, S>
where Self: Sized,
S: Specification<T> { ... }
fn or<S>(self, other: S) -> OrSpec<Self, S>
where Self: Sized,
S: Specification<T> { ... }
fn not(self) -> NotSpec<Self>
where Self: Sized { ... }
}Expand description
Composable predicate over T.