pub trait Sink {
type Error: SinkError;
// Required method
fn matched(
&mut self,
_searcher: &Searcher,
_mat: &SinkMatch<'_>,
) -> Result<bool, Self::Error>;
// Provided methods
fn begin(&mut self, _searcher: &Searcher) -> Result<bool, Self::Error> { ... }
fn finish(
&mut self,
_searcher: &Searcher,
_: &SinkFinish,
) -> Result<(), Self::Error> { ... }
}Expand description
A trait that defines how results from searchers are handled.
The searcher follows the “push” model: the searcher drives execution and pushes results back to the caller via this trait.