blob: e0f10f519e79da69bc1a49376d0a502019170ace (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
//! NOT implementation.
//!
//! Will be automatically included when incluing `filter::Filter`, so importing this module
//! shouldn't be necessary.
//!
use filter::Filter;
#[must_use = "filters are lazy and do nothing unless consumed"]
#[derive(Clone)]
pub struct Not<T> {
a: T
}
impl<T> Not<T> {
pub fn new(a: T) -> Not<T> {
Not { a: a }
}
}
impl_operators!(Not, self e { !self.a.filter(e) }, T);
|