[][src]Struct consistent_hashing::ConsistentHash

pub struct ConsistentHash<K, V> { /* fields omitted */ }

Implementations

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

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

pub fn print_node(&self)[src]

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

pub fn get_node(&self, name: &K) -> Option<&Arc<Mutex<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

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: Send

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

impl<K, V> UnwindSafe for ConsistentHash<K, V> where
    K: 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>,