[−][src]Struct logmap::OptiMap
A concurrent HashMap that uses optimistic concurrency control (hence the name)
Methods
impl<K, V> OptiMap<K, V, RandomState> where
K: PartialEq + Hash,
[src]
K: PartialEq + Hash,
pub fn new() -> Self
[src]
Creates a new OptiMap
with default number of buckets and hasher
pub fn with_capacity(cap: usize) -> Self
[src]
Creates a new OptiMap
with cap
buckets
impl<K, V, S> OptiMap<K, V, S> where
K: PartialEq + Hash,
S: BuildHasher,
[src]
K: PartialEq + Hash,
S: BuildHasher,
pub fn with_hasher(hasher: S) -> Self
[src]
Create a new OptiMap
that uses the given hasher for hashing keys
pub fn with_capacity_and_hasher(cap: usize, hasher: S) -> Self
[src]
Creates a new OptiMap
with cap
collision bucket and the given Hasher
pub fn get(&self, key: &K) -> Option<ValueHolder<K, V>>
[src]
Gets the value associated with the given key if it exists
pub fn contains(&self, key: &K) -> bool
[src]
Checks if the map contains a given key
pub fn put(&self, key: K, value: V)
[src]
Insert a new entry in the OptiMap
.
Note that the map takes ownership of both the key and the value
pub fn delete(&self, key: &K)
[src]
Auto Trait Implementations
impl<K, V, S> Send for OptiMap<K, V, S> where
S: Send,
S: Send,
impl<K, V, S> Unpin for OptiMap<K, V, S> where
S: Unpin,
S: Unpin,
impl<K, V, S> Sync for OptiMap<K, V, S> where
S: Sync,
S: Sync,
impl<K, V, S> UnwindSafe for OptiMap<K, V, S> where
S: UnwindSafe,
S: UnwindSafe,
impl<K, V, S> RefUnwindSafe for OptiMap<K, V, S> where
S: RefUnwindSafe,
S: RefUnwindSafe,
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,