pub trait RemovableOccupiedEntry<'c>: OccupiedEntry<'c> {
    type Removed: 'c;
    fn remove(self) -> (Self::Value, Self::Removed);

    fn remove_value(self) -> Self::Value { ... }
fn vacate(self) -> (Self::Value, Self::Removed)
    where
        Self::Removed: VacantEntry<'c, Occupied = Self>
, { ... } }
Expand description

A trait to represent an OccupiedEntry that can be removed from the collection.

This will consume the OccupiedEntry, returning RemovableOccupiedEntry::Removed.

Associated Types

The type returned when removing the OccupiedEntry

Required methods

remove this entry from the collection, converting the entry into a Self::Removed and returning the value that was there.

Provided methods

remove this entry from the collection, consuming the entry and returning the value that was there.

remove this entry, returning a value and a vacant entry.

Implementors