[][src]Enum lockfreehashmap::map_inner::ValueSlot

pub enum ValueSlot<'v, V: 'v> {
    Value(V),
    Tombstone,
    ValuePrime(&'v ValueSlot<'v, V>),
    SeeNewTable,
}

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

A value has been inserted into the table.

This state represents that a key has been inserted but then removed.

The table is being resized currently and the value here still needs to be inserted into the newer table.

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]

Returns true if and only if the ValueSlot has discriminant Tombstone.

Returns true if and only if the ValueSlot has discriminant ValuePrime.

Returns true if and only if the ValueSlot has discriminant Value.

Returns true if and only if the ValueSlot has discriminant SeeNewTable.

Returns true if and only if the ValueSlot has either discriminant ValuePrime or SeeNewTable.

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]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<'v, V: Debug + 'v> Debug for ValueSlot<'v, V>
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<'v, V> Send for ValueSlot<'v, V> where
    V: Send + Sync

impl<'v, V> Sync for ValueSlot<'v, V> where
    V: Sync

Blanket Implementations

impl<T> From for T
[src]

Performs the conversion.

impl<T, U> Into for T where
    U: From<T>, 
[src]

Performs the conversion.

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

impl<T> Borrow for T where
    T: ?Sized
[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut for T where
    T: ?Sized
[src]

Mutably borrows from an owned value. Read more

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

🔬 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