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
Trait Implementations
sourceimpl<K: PartialEq, V: PartialEq, E: PartialEq> PartialEq<Insertion<K, V, E>> for Insertion<K, V, E>
impl<K: PartialEq, V: PartialEq, E: PartialEq> PartialEq<Insertion<K, V, E>> for Insertion<K, V, E>
impl<K: Eq, V: Eq, E: Eq> Eq for Insertion<K, V, E>
impl<K, V, E> StructuralEq for Insertion<K, V, E>
impl<K, V, E> StructuralPartialEq for Insertion<K, V, E>
Auto Trait Implementations
impl<K, V, E> !RefUnwindSafe for Insertion<K, V, E>
impl<K, V, E> Send for Insertion<K, V, E>where
E: Send,
K: Send,
V: Send,
impl<K, V, E> Sync for Insertion<K, V, E>where
E: Sync,
K: Sync,
V: Sync,
impl<K, V, E> Unpin for Insertion<K, V, E>where
E: Unpin,
impl<K, V, E> !UnwindSafe for Insertion<K, V, E>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more