Trait idmap::table::EntryIterable [−][src]
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
Required Methods
unsafe fn unchecked_entries(&self) -> Self::Iter
Implementors
impl<K: IntegerId, V, T: IdTable> EntryIterable<K, V> for DenseEntryTable<K, V, T> type Iter = UncheckedDenseEntryIter<K, V>;impl<K: IntegerId, V> EntryIterable<K, V> for DirectEntryTable<K, V> type Iter = UncheckedSparseEntryIter<K, V>;