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

A position in a Set used to navigate and modify the ordered set.

A cursor always points at an element in the set, or “off the end” which is a position after the last element in the set.

Implementations

Is this cursor pointing to an empty set?

Move cursor to the next element 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 element and return it.

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

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

Move this cursor to elem.

If elem is in the set, place the cursor at elem and return true.

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

Move this cursor to the first element.

Try to insert elem into the set and leave the cursor at the inserted element.

If the set did not contain elem, insert it and return true.

If elem is already present, don’t change the set, place the cursor at goto(elem), and return false.

Remove the current element (if any) and return it. This advances the cursor to the next element 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.