[][src]Struct rendezvous_hash::WeightedNode

pub struct WeightedNode<N> {
    pub node: N,
    pub capacity: Capacity,
}

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]

pub fn new(node: N, capacity: Capacity) -> Self[src]

Makes a new WeightedNode instance.

Trait Implementations

impl<N: Node> Node for WeightedNode<N>[src]

type NodeId = N::NodeId

Node identifier type.

type HashCode = SignPositiveF64

Hash code type.

impl<N: Clone> Clone for WeightedNode<N>[src]

impl<N: Debug> Debug for WeightedNode<N>[src]

Auto Trait Implementations

impl<N> Send for WeightedNode<N> where
    N: Send

impl<N> Unpin for WeightedNode<N> where
    N: Unpin

impl<N> Sync for WeightedNode<N> where
    N: Sync

impl<N> UnwindSafe for WeightedNode<N> where
    N: UnwindSafe

impl<N> RefUnwindSafe for WeightedNode<N> where
    N: RefUnwindSafe

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]