[−][src]Enum lockfreehashmap::map_inner::ValueSlot
The hash map is implemented as an array of key-value pairs, where each key and value can be one of several states. This enum represents the various states that a value can be in, excluding the null/empty state.
Variants
Value(V)
A value has been inserted into the table.
Tombstone
This state represents that a key has been inserted but then removed.
ValuePrime(&'v ValueSlot<'v, V>)
The table is being resized currently and the value here still needs to be inserted into the newer table.
SeeNewTable
This state represents one of two things:
1) This was a ValueSlot::Tombstone(_)
slot that is now taken. There is a newer
(resized) table that should be used if this value slot was needed.
2) This used to be a ValueSlot::Value(_)
slot that has now been copied into the
newer table.
This is the final state for any ValueSlot
.
Methods
impl<'v, V> ValueSlot<'v, V>
[src]
impl<'v, V> ValueSlot<'v, V>
pub fn is_tombstone(&self) -> bool
[src]
pub fn is_tombstone(&self) -> bool
Returns true if and only if the ValueSlot
has discriminant Tombstone
.
pub fn is_valueprime(&self) -> bool
[src]
pub fn is_valueprime(&self) -> bool
Returns true if and only if the ValueSlot
has discriminant ValuePrime
.
pub fn is_value(&self) -> bool
[src]
pub fn is_value(&self) -> bool
Returns true if and only if the ValueSlot
has discriminant Value
.
pub fn is_seenewtable(&self) -> bool
[src]
pub fn is_seenewtable(&self) -> bool
Returns true if and only if the ValueSlot
has discriminant SeeNewTable
.
pub fn is_prime(&self) -> bool
[src]
pub fn is_prime(&self) -> bool
Returns true if and only if the ValueSlot
has either discriminant ValuePrime
or
SeeNewTable
.
pub fn as_inner(value: Option<&Self>) -> Option<&V>
[src]
pub fn as_inner(value: Option<&Self>) -> Option<&V>
Return an Option
reference to the inner value of generic type V
.
Trait Implementations
impl<'v, V: PartialEq + 'v> PartialEq<ValueSlot<'v, V>> for ValueSlot<'v, V>
[src]
impl<'v, V: PartialEq + 'v> PartialEq<ValueSlot<'v, V>> for ValueSlot<'v, V>
fn eq(&self, other: &ValueSlot<'v, V>) -> bool
[src]
fn eq(&self, other: &ValueSlot<'v, V>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &ValueSlot<'v, V>) -> bool
[src]
fn ne(&self, other: &ValueSlot<'v, V>) -> bool
This method tests for !=
.
impl<'v, V: Debug + 'v> Debug for ValueSlot<'v, V>
[src]
impl<'v, V: Debug + 'v> Debug for ValueSlot<'v, V>
Auto Trait Implementations
impl<'v, V> Send for ValueSlot<'v, V> where
V: Send + Sync,
impl<'v, V> Send for ValueSlot<'v, V> where
V: Send + Sync,
impl<'v, V> Sync for ValueSlot<'v, V> where
V: Sync,
impl<'v, V> Sync for ValueSlot<'v, V> where
V: Sync,
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
try_from
)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
try_from
)Performs the conversion.
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Gets the TypeId
of self
. Read more