pub struct VirtualNode<N>{ /* private fields */ }
Expand description
A type to represent a single virtual node of a distinct Node
in the consistent hashing
ring.
Implementations§
Source§impl<N> VirtualNode<N>
impl<N> VirtualNode<N>
Sourcepub fn replica_owners(&self) -> &[Arc<N>]
pub fn replica_owners(&self) -> &[Arc<N>]
Returns a slice of Node
s, each wrapped in an Arc
, which own a replica for the keys
that are assigned on the VirtualNode<N>
at hand.
The Node
s 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§
Source§impl<N> AsRef<[u8]> for VirtualNode<N>
impl<N> AsRef<[u8]> for VirtualNode<N>
Source§impl<N> Borrow<[u8]> for VirtualNode<N>
impl<N> Borrow<[u8]> for VirtualNode<N>
Source§impl<N> Clone for VirtualNode<N>
impl<N> Clone for VirtualNode<N>
Source§impl<N> Debug for VirtualNode<N>
impl<N> Debug for VirtualNode<N>
Source§impl<N> Display for VirtualNode<N>
impl<N> Display for VirtualNode<N>
Source§impl<N> Hash for VirtualNode<N>
impl<N> Hash for VirtualNode<N>
Source§impl<N> Ord for VirtualNode<N>
impl<N> Ord for VirtualNode<N>
Source§impl<N> PartialEq for VirtualNode<N>
impl<N> PartialEq for VirtualNode<N>
Source§impl<N> PartialOrd for VirtualNode<N>
impl<N> PartialOrd for VirtualNode<N>
impl<N> Eq for VirtualNode<N>
Auto Trait Implementations§
impl<N> Freeze for VirtualNode<N>where
N: ?Sized,
impl<N> RefUnwindSafe for VirtualNode<N>where
N: RefUnwindSafe + ?Sized,
impl<N> Send for VirtualNode<N>
impl<N> Sync for VirtualNode<N>
impl<N> Unpin for VirtualNode<N>where
N: ?Sized,
impl<N> UnwindSafe for VirtualNode<N>where
N: RefUnwindSafe + ?Sized,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more