flexihash-rs
A rust port of https://github.com/pda/flexihash , aiming for 1:1 compatibility
Usage Example
use Flexihash;
let fh = new;
// bulk add
fh.add_targets;
// simple lookup
fh.lookup; // "cache-1"
fh.lookup; // "cache-2"
// add and remove
fh.add_target;
fh.remove_target;
// lookup with next-best fallback (for redundant writes)
fh.lookup_list // ["cache-2", "cache-4"]
// remove cache-2, expect object to hash to cache-4
fh.remove_target
fh.lookup // "cache-4"