pub struct MapCursor<'a, K, V, C>where
    K: 'a + Copy,
    V: 'a + Copy,
    C: 'a + Comparator<K>,
{ /* private fields */ }
Expand description

A position in a Map used to navigate and modify the ordered map.

A cursor always points at a key-value pair in the map, or “off the end” which is a position after the last entry in the map.

Implementations§

Is this cursor pointing to an empty map?

Move cursor to the next key-value pair and return it.

If the cursor reaches the end, return None and leave the cursor at the off-the-end position.

Move cursor to the previous key-value pair and return it.

If the cursor is already pointing at the first entry, leave it there and return None.

Get the current key, or None if the cursor is at the end.

Get the current value, or None if the cursor is at the end.

Get a mutable reference to the current value, or None if the cursor is at the end.

Move this cursor to key.

If key is in the map, place the cursor at key and return the corresponding value.

If key is not in the set, place the cursor at the next larger element (or the end) and return None.

Move this cursor to the first element.

Insert (key, value)) into the map and leave the cursor at the inserted pair.

If the map did not contain key, return None.

If key is already present, replace the existing with value and return the old value.

Remove the current entry (if any) and return the mapped value. This advances the cursor to the next entry after the removed one.

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.