Trait consistent_hash::RingHash
[−]
[src]
pub trait RingHash { fn hash_item<T: Hash>(&self, item: &T) -> u64; fn hash_vnode<K: Hash>(&self, node_key: &K, vnode_seq: usize) -> u64 { ... } }
This trait allows calculating hash codes for virtual nodes and items.
Required Methods
Provided Methods
fn hash_vnode<K: Hash>(&self, node_key: &K, vnode_seq: usize) -> u64
Calculates the hash code of the virtual node.
The default implementation is self.hash_item(&(node_key, vnode_seq))
.
Implementors
impl RingHash for DefaultHash