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§
Source§impl<K, V> LOTable<K, V, RandomState>
impl<K, V> LOTable<K, V, RandomState>
pub fn new() -> Self
pub fn with_capacity(cap: usize) -> Self
Source§impl<K, V, S> LOTable<K, V, S>
impl<K, V, S> LOTable<K, V, S>
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>
pub fn replace_with_mut<F>(&self, k: &K, f: F) -> Option<V>
pub fn contains_key(&self, k: &K) -> bool
pub fn len(&self) -> usize
pub fn iter(&self) -> LOIter<'_, 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§
Auto Trait Implementations§
impl<K, V, S> Freeze for LOTable<K, V, S>where
S: Freeze,
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§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more