Struct lfchring::VirtualNode [−][src]
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]
N: Node,
pub fn replica_owners(&self) -> &[Arc<N>]
[src]
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
impl<N: ?Sized> AsRef<[u8]> for VirtualNode<N> where
N: Node,
[src]
N: Node,
impl<N: ?Sized> Borrow<[u8]> for VirtualNode<N> where
N: Node,
[src]
N: Node,
impl<N: ?Sized> Clone for VirtualNode<N> where
N: Node,
[src]
N: Node,
fn clone(&self) -> Self
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<N: Debug + ?Sized> Debug for VirtualNode<N> where
N: Node,
[src]
N: Node,
impl<N: ?Sized> Display for VirtualNode<N> where
N: Node,
[src]
N: Node,
impl<N: ?Sized> Eq for VirtualNode<N> where
N: Node,
[src]
N: Node,
impl<N: ?Sized> Hash for VirtualNode<N> where
N: Node,
[src]
N: Node,
fn hash<H: StdHasher>(&self, hasher: &mut H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<N: ?Sized> Ord for VirtualNode<N> where
N: Node,
[src]
N: Node,
fn cmp(&self, other: &Self) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl<N: ?Sized> PartialEq<VirtualNode<N>> for VirtualNode<N> where
N: Node,
[src]
N: Node,
impl<N: ?Sized> PartialOrd<VirtualNode<N>> for VirtualNode<N> where
N: Node,
[src]
N: Node,
Auto Trait Implementations
impl<N: ?Sized> RefUnwindSafe for VirtualNode<N> where
N: RefUnwindSafe,
N: RefUnwindSafe,
impl<N: ?Sized> Send for VirtualNode<N> where
N: Send + Sync,
N: Send + Sync,
impl<N: ?Sized> Sync for VirtualNode<N> where
N: Send + Sync,
N: Send + Sync,
impl<N: ?Sized> Unpin for VirtualNode<N>
impl<N: ?Sized> UnwindSafe for VirtualNode<N> where
N: RefUnwindSafe,
N: RefUnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
[src]
pub const ALIGN: usize
[src]
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
[src]
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
[src]
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
[src]
pub unsafe fn drop(ptr: usize)
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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.
pub 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>,