delegating the search logic to a query trait.

This commit is contained in:
Paul Masurel
2016-06-12 16:22:40 +09:00
parent 97edf1f5cb
commit 3d8cd078d1
8 changed files with 173 additions and 27 deletions

8
src/query/query.rs Normal file
View File

@@ -0,0 +1,8 @@
use std::io;
use collector::Collector;
use core::searcher::Searcher;
use common::TimerTree;
pub trait Query {
fn search<C: Collector>(&self, searcher: &Searcher, collector: &mut C) -> io::Result<TimerTree>;
}