[][src]Trait idmap::table::EntryIterable

pub unsafe trait EntryIterable<K, V> {
    type Iter: Iterator<Item = (TableIndex, *const (K, V))> + Clone;
    unsafe fn unchecked_entries(&self) -> Self::Iter;
}

Allows iteration over pointers to all a table's valid entries.

This trait is completely unsafe and has to use raw pointers, since there's currently no way for a trait to express that the iterators it returns are bound to the lifetime of the struct.

Using the either the iterator or the values it return beyond the lifetime of the reference to the iterable is undefined behavior the compiler can't check your for, so it's recommended to use the safe wrappers SafeEntries and SafeEntriesMut

However, it can be safely wrapped in SafeEntries and SafeEntriesMut traits.

Associated Types

Loading content...

Required methods

unsafe fn unchecked_entries(&self) -> Self::Iter

Loading content...

Implementors

impl<K: IntegerId, V> EntryIterable<K, V> for DirectEntryTable<K, V>[src]

type Iter = UncheckedSparseEntryIter<K, V>

impl<K: IntegerId, V, T: IdTable> EntryIterable<K, V> for DenseEntryTable<K, V, T>[src]

type Iter = UncheckedDenseEntryIter<K, V>

Loading content...