[][src]Struct consistent_hashing::ConsistentHash

pub struct ConsistentHash<K, V> {
    pub user_keys: Vec<K>,
    // some fields omitted
}

Fields

user_keys: Vec<K>

Implementations

impl<K: Hash + Ord, V: Evict + Clone> ConsistentHash<K, V>[src]

pub fn new(replicas: i32) -> Result<ConsistentHash<K, V>, String>[src]

pub fn print_node(&self) where
    K: Display,
    V: Display
[src]

pub fn add_node(&mut self, key: K, value: V) -> Result<(), String>[src]

pub fn get_node(&self, name: &K) -> Option<&V>[src]

pub fn get_mut_node(&mut self, name: &K) -> Option<&mut V>[src]

pub fn delete_node(&mut self, name: &K) -> Result<(), String>[src]

pub fn search_nearest(&self, name: u128) -> Option<u128>[src]

Auto Trait Implementations

impl<K, V> RefUnwindSafe for ConsistentHash<K, V> where
    K: RefUnwindSafe,
    V: RefUnwindSafe

impl<K, V> Send for ConsistentHash<K, V> where
    K: Send,
    V: Send

impl<K, V> Sync for ConsistentHash<K, V> where
    K: Sync,
    V: Sync

impl<K, V> Unpin for ConsistentHash<K, V> where
    K: Unpin,
    V: Unpin

impl<K, V> UnwindSafe for ConsistentHash<K, V> where
    K: UnwindSafe,
    V: UnwindSafe

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, 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<V, T> VZip<V> for T where
    V: MultiLane<T>,