[go: up one dir, main page]

Struct lever::table::lotable::LOTable[][src]

pub struct LOTable<K, V, S = RandomState> where
    K: 'static + PartialEq + Eq + Hash + Clone + Send + Sync,
    V: 'static + Clone + Send + Sync,
    S: BuildHasher
{ /* fields omitted */ }

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

impl<K, V> LOTable<K, V, RandomState> where
    K: PartialEq + Eq + Hash + Clone + Send + Sync,
    V: Clone + Send + Sync
[src]

pub fn new() -> Self[src]

pub fn with_capacity(cap: usize) -> Self[src]

impl<K, V, S> LOTable<K, V, S> where
    K: PartialEq + Eq + Hash + Clone + Send + Sync,
    V: Clone + Send + Sync,
    S: BuildHasher
[src]

pub fn insert(&self, k: K, v: V) -> Result<Arc<Option<V>>>[src]

pub fn remove(&self, k: &K) -> Result<Arc<Option<V>>>[src]

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

pub fn replace_with<F>(&self, k: &K, f: F) -> Option<V> where
    F: Fn(Option<&V>) -> Option<V>, 
[src]

pub fn replace_with_mut<F>(&self, k: &K, mut f: F) -> Option<V> where
    F: FnMut(&mut Option<V>) -> &mut Option<V>, 
[src]

pub fn contains_key(&self, k: &K) -> bool[src]

pub fn len(&self) -> usize[src]

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);
[src]

pub fn clear(&self)[src]

pub fn keys<'table>(&'table self) -> impl Iterator<Item = K> + 'table[src]

pub fn values<'table>(&'table self) -> impl Iterator<Item = V> + 'table[src]

pub fn tx_manager(&self) -> Arc<TxnManager>[src]

Trait Implementations

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
[src]

impl<K, V, S> Debug for LOTable<K, V, S> where
    K: 'static + PartialEq + Eq + Hash + Clone + Send + Sync + Debug,
    V: 'static + Clone + Send + Sync + Debug,
    S: BuildHasher
[src]

impl<K, V, S> Default for LOTable<K, V, S> where
    K: 'static + PartialEq + Eq + Hash + Clone + Send + Sync,
    V: 'static + Clone + Send + Sync,
    S: Default + BuildHasher
[src]

fn default() -> LOTable<K, V, S>[src]

Creates an empty LOTable<K, V, S>, with the Default value for the hasher.

Auto Trait Implementations

impl<K, V, S = RandomState> !RefUnwindSafe for LOTable<K, V, S>[src]

impl<K, V, S> Send for LOTable<K, V, S> where
    S: Send
[src]

impl<K, V, S> Sync for LOTable<K, V, S> where
    S: Sync
[src]

impl<K, V, S> Unpin for LOTable<K, V, S> where
    S: Unpin
[src]

impl<K, V, S = RandomState> !UnwindSafe for LOTable<K, V, S>[src]

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.