pub trait AccessStatsCollector {
// Provided methods
fn found_on_level(&mut self, _level_nr: usize) { ... }
fn fail_on_level(&mut self, _level_nr: usize) { ... }
}Expand description
Trait for collecting (and summarizing or reporting) events during querying of a minimal perfect hashing function.
Provided Methods§
Sourcefn found_on_level(&mut self, _level_nr: usize)
fn found_on_level(&mut self, _level_nr: usize)
Lookup algorithm calls this method to report that a value has been just found at given level (counting from 0).
The single lookup can call found_on_level few times if it finds the fragments on value at different levels.
Sourcefn fail_on_level(&mut self, _level_nr: usize)
fn fail_on_level(&mut self, _level_nr: usize)
Lookup algorithm calls this method to report that a value has not been found and reports number of level searched (counting from 0).
Implementations on Foreign Types§
impl AccessStatsCollector for ()
Ignores all events and does nothing.
Source§impl AccessStatsCollector for usize
Increases own value by the number of levels visited, regardless of the result of the search.
impl AccessStatsCollector for usize
Increases own value by the number of levels visited, regardless of the result of the search.