Enum lockfree::map::Insertion

source ·
pub enum Insertion<K, V, E> {
    Created,
    Updated(Removed<K, V>),
    Failed(E),
}
Expand description

A insert_with operation result.

Variants

Created

The entry was created.

Updated(Removed<K, V>)

The entry was updated and this was the old pair.

Failed(E)

The insertion failed and no operation was performed. Failure of an insertion might happen because the closure rejected the conditions. Another reason is that method-specific contract was not respected (such as the one of reinsert_with).

Implementations

Returns whether the insertion created an entry.

Returns whether the insertion updated an entry.

Tries to take the updated entry of this insertion and encodes it as a Result. Ok is returned only if this insertion updated a value.

Returns whether the insertion failed.

Tries to take the failure of this insertion and encodes it as a Result. Ok is returned only if this insertion has a failure.

Trait Implementations

Formats the value using the given formatter. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.