pub struct LOTable<K, V, S = RandomState> where
K: 'static + PartialEq + Eq + Hash + Clone + Send + Sync,
V: 'static + Clone + Send + Sync,
S: BuildHasher, { /* private fields */ }Expand description
Lever Transactional Table implementation with Optimistic concurrency and RepeatableRead isolation.
Transactional hash table fully concurrent and as long as no conflicts are made it is both lock and wait free.
Implementations
sourceimpl<K, V> LOTable<K, V, RandomState> where
K: PartialEq + Eq + Hash + Clone + Send + Sync,
V: Clone + Send + Sync,
impl<K, V> LOTable<K, V, RandomState> where
K: PartialEq + Eq + Hash + Clone + Send + Sync,
V: Clone + Send + Sync,
pub fn new() -> Self
pub fn with_capacity(cap: usize) -> Self
sourceimpl<K, V, S> LOTable<K, V, S> where
K: PartialEq + Eq + Hash + Clone + Send + Sync,
V: Clone + Send + Sync,
S: BuildHasher,
impl<K, V, S> LOTable<K, V, S> where
K: PartialEq + Eq + Hash + Clone + Send + Sync,
V: Clone + Send + Sync,
S: BuildHasher,
pub fn insert(&self, k: K, v: V) -> Result<Arc<Option<V>>>
pub fn remove(&self, k: &K) -> Result<Arc<Option<V>>>
pub fn get(&self, k: &K) -> Option<V>
pub fn replace_with<F>(&self, k: &K, f: F) -> Option<V> where
F: Fn(Option<&V>) -> Option<V>,
pub fn replace_with_mut<F>(&self, k: &K, f: F) -> Option<V> where
F: FnMut(&mut Option<V>) -> &mut Option<V>,
pub fn contains_key(&self, k: &K) -> bool
pub fn len(&self) -> usize
pub fn iter(&self) -> LOIter<'_, K, V>ⓘNotable traits for LOIter<'it, K, V>impl<'it, K, V> Iterator for LOIter<'it, K, V> where
K: 'static + PartialEq + Eq + Hash + Clone + Send + Sync,
V: 'static + Clone + Send + Sync, type Item = (K, V);
K: 'static + PartialEq + Eq + Hash + Clone + Send + Sync,
V: 'static + Clone + Send + Sync, type Item = (K, V);
pub fn clear(&self)
pub fn keys<'table>(&'table self) -> impl Iterator<Item = K> + 'table
pub fn values<'table>(&'table self) -> impl Iterator<Item = V> + 'table
pub fn tx_manager(&self) -> Arc<TxnManager>
Trait Implementations
sourceimpl<K: Clone, V: Clone, S: Clone> Clone for LOTable<K, V, S> where
K: 'static + PartialEq + Eq + Hash + Clone + Send + Sync,
V: 'static + Clone + Send + Sync,
S: BuildHasher,
impl<K: Clone, V: Clone, S: Clone> Clone for LOTable<K, V, S> where
K: 'static + PartialEq + Eq + Hash + Clone + Send + Sync,
V: 'static + Clone + Send + Sync,
S: BuildHasher,
Auto Trait Implementations
impl<K, V, S = RandomState> !RefUnwindSafe for LOTable<K, V, S>
impl<K, V, S> Send for LOTable<K, V, S> where
S: Send,
impl<K, V, S> Sync for LOTable<K, V, S> where
S: Sync,
impl<K, V, S> Unpin for LOTable<K, V, S> where
S: Unpin,
impl<K, V, S = RandomState> !UnwindSafe for LOTable<K, V, S>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
sourceimpl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more