pub struct DirectEntryTable<K: IntegerId, V> { /* private fields */ }Expand description
A entry table that stores in a flat array
This has very fast O(1) access but can waste memory
if the entries are sparse
Trait Implementations§
Source§impl<K: Clone + IntegerId, V: Clone> Clone for DirectEntryTable<K, V>
impl<K: Clone + IntegerId, V: Clone> Clone for DirectEntryTable<K, V>
Source§fn clone(&self) -> DirectEntryTable<K, V>
fn clone(&self) -> DirectEntryTable<K, V>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<K: IntegerId, V> EntryIterable<K, V> for DirectEntryTable<K, V>
impl<K: IntegerId, V> EntryIterable<K, V> for DirectEntryTable<K, V>
Source§type Iter = UncheckedSparseEntryIter<K, V>
type Iter = UncheckedSparseEntryIter<K, V>
👎Deprecated since 0.2.22: With the advent of GAT, this API is needlessly unsafe
The type that iterates over this table’s pointers
Source§unsafe fn unchecked_entries(&self) -> Self::Iter
unsafe fn unchecked_entries(&self) -> Self::Iter
👎Deprecated since 0.2.22: With the advent of GAT, this API is needlessly unsafe
Iterate over raw pointers in this table Read more
Source§impl<K: IntegerId, V> EntryTable<K, V> for DirectEntryTable<K, V>
impl<K: IntegerId, V> EntryTable<K, V> for DirectEntryTable<K, V>
Source§fn with_capacity(capacity: usize) -> Self
fn with_capacity(capacity: usize) -> Self
Create a new table, initialized to the specified capacity
Source§fn get_mut(&mut self, key: &K) -> Option<&mut V>
fn get_mut(&mut self, key: &K) -> Option<&mut V>
Get a mutable reference to the entry corresponding to the specified key
Source§fn insert(&mut self, key: K, value: V) -> Option<V>
fn insert(&mut self, key: K, value: V) -> Option<V>
Insert a value and associate it with the specified key,
returning the previous value
Source§fn insert_vacant(&mut self, key: K, value: V) -> &mut V
fn insert_vacant(&mut self, key: K, value: V) -> &mut V
Insert a value into a vacant slot, returning a reference to the new value
Source§fn swap_remove(&mut self, key: &K) -> Option<V>
fn swap_remove(&mut self, key: &K) -> Option<V>
Remove the value associated with the specified key. Read more
Source§fn retain<F>(&mut self, func: F)
fn retain<F>(&mut self, func: F)
Retain the specified entries in the map, returning if any indexes changed
Source§impl<K: IntegerId, V> IntoIterator for DirectEntryTable<K, V>
impl<K: IntegerId, V> IntoIterator for DirectEntryTable<K, V>
Auto Trait Implementations§
impl<K, V> Freeze for DirectEntryTable<K, V>
impl<K, V> RefUnwindSafe for DirectEntryTable<K, V>where
K: RefUnwindSafe,
V: RefUnwindSafe,
impl<K, V> Send for DirectEntryTable<K, V>
impl<K, V> Sync for DirectEntryTable<K, V>
impl<K, V> Unpin for DirectEntryTable<K, V>
impl<K, V> UnwindSafe for DirectEntryTable<K, V>where
K: UnwindSafe,
V: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more