Add BoolFilter

This commit is contained in:
Matthias Beyer 2016-07-31 11:56:12 +02:00
parent 5cd2964fe3
commit 79c1edcbd1
2 changed files with 25 additions and 0 deletions

View file

@ -0,0 +1,22 @@
use libimagstore::store::Entry;
use filter::Filter;
pub struct BoolFilter(bool);
impl BoolFilter {
pub fn new(b: bool) -> BoolFilter {
BoolFilter(b)
}
}
impl Filter for BoolFilter {
fn filter(&self, _: &Entry) -> bool {
self.0
}
}

View file

@ -1,2 +1,5 @@
pub mod content;
pub mod header;
pub mod bool_filter;