pub trait Filter<R> {
    fn filter_one(&self, data: &R) -> bool;

    fn filter_vec(&self, data: &mut Vec<R>) { ... }
    fn filter_ref_vec(&self, data: &mut Vec<&R>) { ... }
}
Expand description

An object representing a test for objects to see whether they are included in a given result set.

Each stanza of a query results in one Filter being constructed. There is no dynamic dispatch below this point in general, a unique codepath is generated for every combination of field and operator, which ends up resulting in a filter for each one of these.

Required methods

Produce a true/false response indicating an in/out result for the object.

Provided methods

Helper method to filter an entire vector by this filter. Note that there is no virtual function call overhead here.

Helper method to filter an entire vector by this filter. Note that there is no virtual function call overhead here.

Implementors