[−][src]Struct rendezvous_hash::WeightedNode
Weighted node.
This is used for representing a heterogeneous environment in which there are nodes which have various capacities.
Internally this uses an efficient weighted hash function that based on the "Logarithmic Method" described in the paper "Weighted Distributed Hash Tables". So, normally, additional cost for considering node capacity is negligible.
Fields
node: N
The node.
capacity: Capacity
The capacity of this node.
Methods
impl<N: Node> WeightedNode<N>
[src]
Trait Implementations
impl<N: Node> Node for WeightedNode<N>
[src]
type NodeId = N::NodeId
Node identifier type.
type HashCode = SignPositiveF64
Hash code type.
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: Clone> Clone for WeightedNode<N>
[src]
fn clone(&self) -> WeightedNode<N>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<N: Debug> Debug for WeightedNode<N>
[src]
Auto Trait Implementations
impl<N> Send for WeightedNode<N> where
N: Send,
N: Send,
impl<N> Unpin for WeightedNode<N> where
N: Unpin,
N: Unpin,
impl<N> Sync for WeightedNode<N> where
N: Sync,
N: Sync,
impl<N> UnwindSafe for WeightedNode<N> where
N: UnwindSafe,
N: UnwindSafe,
impl<N> RefUnwindSafe for WeightedNode<N> where
N: RefUnwindSafe,
N: RefUnwindSafe,
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,