[−][src]Trait rendezvous_hash::Node
This trait represents a candidate node for rendezvous.
Associated Types
Loading content...Required methods
fn node_id(&self) -> &Self::NodeId
Returns the identifier of this node.
fn hash_code<H, U: Hash>(&self, hasher: &H, item: &U) -> Self::HashCode where
H: NodeHasher<Self::NodeId>,
H: NodeHasher<Self::NodeId>,
Returns the hash code for the combination of thid node and item
.
Note that the time complexity of this function should be constant.
Implementations on Foreign Types
impl<'_, T: Node> Node for &'_ T
[src]
type NodeId = T::NodeId
type HashCode = T::HashCode
fn node_id(&self) -> &Self::NodeId
[src]
fn hash_code<H, U: Hash>(&self, hasher: &H, item: &U) -> Self::HashCode where
H: NodeHasher<Self::NodeId>,
[src]
H: NodeHasher<Self::NodeId>,
impl<'a> Node for &'a str
[src]
type NodeId = Self
type HashCode = u64
fn node_id(&self) -> &Self::NodeId
[src]
fn hash_code<H, U: Hash>(&self, hasher: &H, item: &U) -> Self::HashCode where
H: NodeHasher<Self::NodeId>,
[src]
H: NodeHasher<Self::NodeId>,
Implementors
impl<K, V> Node for KeyValueNode<K, V> where
K: Hash + PartialEq + Ord,
[src]
K: Hash + PartialEq + Ord,
type NodeId = K
type HashCode = u64
fn node_id(&self) -> &Self::NodeId
[src]
fn hash_code<H, U: Hash>(&self, hasher: &H, item: &U) -> Self::HashCode where
H: NodeHasher<Self::NodeId>,
[src]
H: NodeHasher<Self::NodeId>,
impl<N: Node> Node for WeightedNode<N>
[src]
type NodeId = N::NodeId
type HashCode = SignPositiveF64
fn node_id(&self) -> &Self::NodeId
[src]
fn hash_code<H, U: Hash>(&self, hasher: &H, item: &U) -> Self::HashCode where
H: NodeHasher<Self::NodeId>,
[src]
H: NodeHasher<Self::NodeId>,
impl<T> Node for IdNode<T> where
T: Hash + PartialEq + Ord,
[src]
T: Hash + PartialEq + Ord,