qht/
filter.rs

1pub use std::hash::Hash;
2// --------------------------------------------------------------------------------
3// Filter
4
5/// A `Filter` provides duplicate detection capabilities
6pub trait Filter {
7    /// Performs a lookup for the provided element
8    fn lookup(&self, e: impl Hash) -> bool;
9
10    /// Performs a lookup for the provided element and inserts it
11    fn insert(&mut self, e: impl Hash) -> bool;
12}