rust-maglev

Google's consistent hashing algorithm
Usage
To use maglev, first add this to your Cargo.toml:
[]
= "0.1"
Then, add this to your crate root:
extern crate maglev;
use *;
And then, use Maglev with ConsistentHasher trait
let m = new;
assert_eq!;
assert_eq!;
When the node list changed, ensure to use same capacity to rebuild
let m = with_capacity;
assert_eq!;
assert_eq!;
Maglev use std::collections::hash_map::DefaultHasher by default, we could use the given hash builder to hash keys.
use SpookyHash128;
let m = with_hasher;
assert_eq!;
assert_eq!;