blob: 3c322710b81459e096cb93cd0a75199464b4ffe6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
//! Bool Filter implementation, so we can insert this in filter construction
//!
//! 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 Bool {
b: bool
}
impl Bool {
pub fn new(b: bool) -> Bool {
Bool { b: b }
}
}
impl From<bool> for Bool {
fn from(b: bool) -> Bool {
Bool::new(b)
}
}
impl_operators!(Bool, self e { self.b }, );
|