Struct hash_rings::carp::Node[][src]

pub struct Node<'a, T> where
    T: 'a, 
{ /* fields omitted */ }

A node with an associated weight.

The distribution of points to nodes is proportional to the weights of the nodes. For example, a node with a weight of 3 will receive approximately three times more points than a node with a weight of 1.

Methods

impl<'a, T> Node<'a, T> where
    T: Hash
[src]

Constructs a new node with a particular weight associated with it.

Examples

use hash_rings::carp::{Node, Ring};

let node = Node::new(&"node-1", 1f64);

Auto Trait Implementations

impl<'a, T> Send for Node<'a, T> where
    T: Sync

impl<'a, T> Sync for Node<'a, T> where
    T: Sync