pub trait SelectionAlgorithm {
    // Required methods
    fn new() -> Self;
    fn next(&self, key: &[u8]) -> u64;
}
Expand description

SelectionAlgorithm is the interface to implement selection algorithms.

All std::hash::Hasher + Default can be used directly as a selection algorithm.

Required Methods§

source

fn new() -> Self

Create a new implementation

source

fn next(&self, key: &[u8]) -> u64

Return the next index of backend. The caller should perform modulo to get the valid index of the backend.

Object Safety§

This trait is not object safe.

Implementors§