Struct concurrent_map::ConcurrentMap
source · pub struct ConcurrentMap<K, V>where
K: 'static + Debug + Minimum + Ord + Send + Sync,
V: 'static + Debug + Send + Sync,{ /* private fields */ }Expand description
A lock-free B+ tree.
If you want to use a custom key type, you must
implement the concurrent_map::Minimum trait,
allowing the left-most side of the tree to be
created before inserting any data.
Implementations
sourceimpl<K, V> ConcurrentMap<K, V>where
K: 'static + Debug + Minimum + Ord + Send + Sync,
V: 'static + Debug + Send + Sync,
impl<K, V> ConcurrentMap<K, V>where
K: 'static + Debug + Minimum + Ord + Send + Sync,
V: 'static + Debug + Send + Sync,
pub fn get(&mut self, key: &K) -> Option<Arc<V>>
pub fn insert(&mut self, key: K, value: V) -> Option<Arc<V>>
pub fn remove(&mut self, key: &K) -> Option<Arc<V>>
pub fn iter<'a>(&'a mut self) -> Iter<'a, K, V>where
K: Clone,
pub fn range<'a, R: RangeBounds<K>>(&'a mut self, range: R) -> Iter<'a, K, V, R>
Trait Implementations
sourceimpl<K: Clone, V: Clone> Clone for ConcurrentMap<K, V>where
K: 'static + Debug + Minimum + Ord + Send + Sync,
V: 'static + Debug + Send + Sync,
impl<K: Clone, V: Clone> Clone for ConcurrentMap<K, V>where
K: 'static + Debug + Minimum + Ord + Send + Sync,
V: 'static + Debug + Send + Sync,
sourcefn clone(&self) -> ConcurrentMap<K, V>
fn clone(&self) -> ConcurrentMap<K, V>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations
impl<K, V> !RefUnwindSafe for ConcurrentMap<K, V>
impl<K, V> Send for ConcurrentMap<K, V>
impl<K, V> !Sync for ConcurrentMap<K, V>
impl<K, V> Unpin for ConcurrentMap<K, V>
impl<K, V> !UnwindSafe for ConcurrentMap<K, V>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more