Struct lfchring::VirtualNode[][src]

pub struct VirtualNode<N: ?Sized> where
    N: Node
{ /* fields omitted */ }

A type to represent a single virtual node of a distinct Node in the consistent hashing ring.

Implementations

impl<N: ?Sized> VirtualNode<N> where
    N: Node
[src]

pub fn replica_owners(&self) -> &[Arc<N>][src]

Returns a slice of Nodes, each wrapped in an Arc, which own a replica for the keys that are assigned on the VirtualNode<N> at hand.

The Nodes are returned according to their order in the consistent hashing ring. Therefore, the first Node is always the one that the particular VirtualNode originally belongs to.

Trait Implementations

impl<N: ?Sized> AsRef<[u8]> for VirtualNode<N> where
    N: Node
[src]

impl<N: ?Sized> Borrow<[u8]> for VirtualNode<N> where
    N: Node
[src]

impl<N: ?Sized> Clone for VirtualNode<N> where
    N: Node
[src]

impl<N: Debug + ?Sized> Debug for VirtualNode<N> where
    N: Node
[src]

impl<N: ?Sized> Display for VirtualNode<N> where
    N: Node
[src]

impl<N: ?Sized> Eq for VirtualNode<N> where
    N: Node
[src]

impl<N: ?Sized> Hash for VirtualNode<N> where
    N: Node
[src]

impl<N: ?Sized> Ord for VirtualNode<N> where
    N: Node
[src]

impl<N: ?Sized> PartialEq<VirtualNode<N>> for VirtualNode<N> where
    N: Node
[src]

impl<N: ?Sized> PartialOrd<VirtualNode<N>> for VirtualNode<N> where
    N: Node
[src]

Auto Trait Implementations

impl<N: ?Sized> RefUnwindSafe for VirtualNode<N> where
    N: RefUnwindSafe

impl<N: ?Sized> Send for VirtualNode<N> where
    N: Send + Sync

impl<N: ?Sized> Sync for VirtualNode<N> where
    N: Send + Sync

impl<N: ?Sized> Unpin for VirtualNode<N>

impl<N: ?Sized> UnwindSafe for VirtualNode<N> where
    N: RefUnwindSafe

Blanket Implementations

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

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

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

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

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

impl<T> Pointable for T[src]

type Init = T

The type for initializers.

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

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[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.