pub trait AccessStatsCollector {
    // Provided methods
    fn found_on_level(&mut self, _level_nr: u32) { ... }
    fn fail_on_level(&mut self, _level_nr: u32) { ... }
}
Expand description

Trait for collecting (and summarizing or reporting) events during querying of a minimal perfect hashing function.

Provided Methods§

source

fn found_on_level(&mut self, _level_nr: u32)

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.

source

fn fail_on_level(&mut self, _level_nr: u32)

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§

source§

impl AccessStatsCollector for u32

Increases own value by the number of levels visited, regardless of the result of the search.

source§

fn found_on_level(&mut self, level_nr: u32)

source§

fn fail_on_level(&mut self, level_nr: u32)

source§

impl AccessStatsCollector for u64

Increases own value by the number of levels visited, regardless of the result of the search.

source§

fn found_on_level(&mut self, level_nr: u32)

source§

fn fail_on_level(&mut self, level_nr: u32)

source§

impl AccessStatsCollector for ()

Ignores all events and does nothing.

Implementors§