Struct cpp_map::PIterator [−][src]
Expand description
An effort to emulate a C++ std::map iterator in Rust. It will have functionality like: prev(), next(), get(), erase(), lower_bound(), replace_key()
Implementations
Initiates the pointer with a list, set current to the head of the list.
Initiates the pointer with a list, set index.
Move to the next element. Note that this is NOT a Rust iterator next() method. Always check validity of the iterator with is_ok() after next()
Move to the previous element Always check validity of the iterator with is_ok() after prev()
Move to the first element
Move to the last element
Return true if pointer has NOT moved past beginning or end of the list
Return true if pointer is at head position or if the list is empty
Return true if pointer is at tail position or if the list is empty
Replace current key. This will destroy the internal order of element if you replace an element with something out of order.
Remove the current element and return it. Move current to the old prev value if exist. Else pick old next index. Note: make sure that there are no other Pointer objects at this position.
Returns a new Pointer positioned at the lower bound item. Lower bound item is the first element in the container whose key is not considered to go before position (i.e., either it is equivalent or goes after). Returns a Pointer where is_ok() returns false if no data is found
Trait Implementations
Auto Trait Implementations
impl<K, V> !RefUnwindSafe for PIterator<K, V>
impl<K, V> !UnwindSafe for PIterator<K, V>
Blanket Implementations
Mutably borrows from an owned value. Read more