[][src]Struct hashbrown::raw::RawIter

pub struct RawIter<T> { /* fields omitted */ }

Iterator which returns a raw pointer to every full bucket in the table.

For maximum flexibility this iterator is not bound by a lifetime, but you must observe several rules when using it:

  • You must not free the hash table while iterating (including via growing/shrinking).
  • It is fine to erase a bucket that has been yielded by the iterator.
  • Erasing a bucket that has not yet been yielded by the iterator may still result in the iterator yielding that bucket (unless reflect_remove is called).
  • It is unspecified whether an element inserted after the iterator was created will be yielded by that iterator (unless reflect_insert is called).
  • The order in which the iterator yields bucket is unspecified and may change in the future.

Implementations

impl<T> RawIter<T>[src]

pub fn reflect_remove(&mut self, b: &Bucket<T>)[src]

Refresh the iterator so that it reflects a removal from the given bucket.

For the iterator to remain valid, this method must be called once for each removed bucket before next is called again.

This method should be called before the removal is made. It is not necessary to call this method if you are removing an item that this iterator yielded in the past.

pub fn reflect_insert(&mut self, b: &Bucket<T>)[src]

Refresh the iterator so that it reflects an insertion into the given bucket.

For the iterator to remain valid, this method must be called once for each insert before next is called again.

This method does not guarantee that an insertion of a bucket witha greater index than the last one yielded will be reflected in the iterator.

This method should be called after the given insert is made.

Trait Implementations

impl<T> Clone for RawIter<T>[src]

impl<T> ExactSizeIterator for RawIter<T>[src]

impl<T> From<RawIter<T>> for RawParIter<T>[src]

impl<T> FusedIterator for RawIter<T>[src]

impl<T> Iterator for RawIter<T>[src]

type Item = Bucket<T>

The type of the elements being iterated over.

Auto Trait Implementations

impl<T> RefUnwindSafe for RawIter<T> where
    T: RefUnwindSafe

impl<T> Send for RawIter<T>

impl<T> Sync for RawIter<T>

impl<T> Unpin for RawIter<T>

impl<T> UnwindSafe for RawIter<T> where
    T: RefUnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

impl<T> ParallelBridge for T where
    T: Send + Iterator,
    <T as Iterator>::Item: Send
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.