Struct densevec::KeyedDenseVec
source · [−]pub struct KeyedDenseVec<K, T> { /* private fields */ }
Implementations
sourceimpl<K: Key, T> KeyedDenseVec<K, T>
impl<K: Key, T> KeyedDenseVec<K, T>
pub fn new() -> KeyedDenseVec<K, T>
pub fn with_capacity(capacity: usize) -> Self
pub fn capacity(&self) -> usize
pub fn reserve(&mut self, additional: usize)
pub fn reserve_exact(&mut self, additional: usize)
pub fn shrink_to_fit(&mut self)
pub fn keys(&self) -> Keys<'_, K>ⓘNotable traits for Keys<'a, K>impl<'a, K: Key> Iterator for Keys<'a, K> type Item = K;
pub fn values(&self) -> Values<'_, T>ⓘNotable traits for Values<'a, T>impl<'a, T> Iterator for Values<'a, T> type Item = &'a T;
pub fn values_mut(&mut self) -> ValuesMut<'_, T>ⓘNotable traits for ValuesMut<'a, T>impl<'a, T> Iterator for ValuesMut<'a, T> type Item = &'a mut T;
pub fn iter(&self) -> Iter<'_, K, T>ⓘNotable traits for Iter<'a, K, T>impl<'a, K: Key, T: 'a> Iterator for Iter<'a, K, T> type Item = (K, &'a T);
pub fn iter_mut(&mut self) -> IterMut<'_, K, T>ⓘNotable traits for IterMut<'a, K, T>impl<'a, K: Key, T: 'a> Iterator for IterMut<'a, K, T> type Item = (K, &'a mut T);
pub fn fast_ids_iter(&self) -> FastIter<'_, T>ⓘNotable traits for FastIter<'a, T>impl<'a, T: 'a> Iterator for FastIter<'a, T> type Item = (usize, &'a T);
pub fn fast_ids_iter_mut(&mut self) -> FastIterMut<'_, T>ⓘNotable traits for FastIterMut<'a, T>impl<'a, T: 'a> Iterator for FastIterMut<'a, T> type Item = (usize, &'a mut T);
pub fn entry(&mut self, guid: K) -> Entry<'_, K, T>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn clear(&mut self)
pub fn get(&self, guid: K) -> Option<&T>
pub fn get_mut(&mut self, guid: K) -> Option<&mut T>
pub unsafe fn get_unchecked(&self, guid: K) -> &T
pub unsafe fn get_unchecked_mut(&mut self, guid: K) -> &mut T
pub fn get_fast(&self, idx: FastIndex) -> Option<&T>
pub fn get_fast_mut(&mut self, idx: FastIndex) -> Option<&mut T>
pub unsafe fn get_fast_unchecked(&self, idx: FastIndex) -> &T
pub unsafe fn get_fast_unchecked_mut(&mut self, idx: FastIndex) -> &mut T
pub fn contains_key(&self, guid: K) -> bool
pub fn insert(&mut self, guid: K, t: T) -> Option<T>
pub fn insert_fast_index(&mut self, guid: K, t: T) -> (Option<T>, FastIndex)
pub fn remove(&mut self, guid: K) -> Option<T>
pub fn insert_key_gen(&mut self, value: T) -> K
pub fn insert_fast_index_key_gen(&mut self, value: T) -> (K, FastIndex)
pub fn swap(&mut self, guid1: K, guid2: K)
pub fn fast_index_for(&self, guid: K) -> Option<FastIndex>
pub unsafe fn fast_index_unchecked_for(&self, guid: K) -> FastIndex
pub fn guid_from_fast_index(&self, idx: usize) -> Option<K>
pub unsafe fn unchecked_guid_from_fast_index(&self, idx: usize) -> K
Trait Implementations
sourceimpl<K, T: Clone> Clone for KeyedDenseVec<K, T>
impl<K, T: Clone> Clone for KeyedDenseVec<K, T>
sourcefn clone(&self) -> KeyedDenseVec<K, T>
fn clone(&self) -> KeyedDenseVec<K, T>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<K: Key, T> Default for KeyedDenseVec<K, T>
impl<K: Key, T> Default for KeyedDenseVec<K, T>
sourcefn default() -> KeyedDenseVec<K, T>
fn default() -> KeyedDenseVec<K, T>
Returns the “default value” for a type. Read more
sourceimpl<'a, K: Key, T: 'a + Copy> Extend<(K, &'a T)> for KeyedDenseVec<K, T>
impl<'a, K: Key, T: 'a + Copy> Extend<(K, &'a T)> for KeyedDenseVec<K, T>
sourcefn extend<I>(&mut self, iter: I) where
I: IntoIterator<Item = (K, &'a T)>,
fn extend<I>(&mut self, iter: I) where
I: IntoIterator<Item = (K, &'a T)>,
Extends a collection with the contents of an iterator. Read more
sourcefn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬 This is a nightly-only experimental API. (
extend_one
)Extends a collection with exactly one element.
sourcefn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬 This is a nightly-only experimental API. (
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
sourceimpl<K: Key, T> Extend<(K, T)> for KeyedDenseVec<K, T>
impl<K: Key, T> Extend<(K, T)> for KeyedDenseVec<K, T>
sourcefn extend<I>(&mut self, iter: I) where
I: IntoIterator<Item = (K, T)>,
fn extend<I>(&mut self, iter: I) where
I: IntoIterator<Item = (K, T)>,
Extends a collection with the contents of an iterator. Read more
sourcefn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬 This is a nightly-only experimental API. (
extend_one
)Extends a collection with exactly one element.
sourcefn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬 This is a nightly-only experimental API. (
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
sourceimpl<K: Key, T> FromIterator<(K, T)> for KeyedDenseVec<K, T>
impl<K: Key, T> FromIterator<(K, T)> for KeyedDenseVec<K, T>
sourcefn from_iter<I>(iter: I) -> KeyedDenseVec<K, T> where
I: IntoIterator<Item = (K, T)>,
fn from_iter<I>(iter: I) -> KeyedDenseVec<K, T> where
I: IntoIterator<Item = (K, T)>,
Creates a value from an iterator. Read more
sourceimpl<K: Key, T> Index<K> for KeyedDenseVec<K, T>
impl<K: Key, T> Index<K> for KeyedDenseVec<K, T>
sourceimpl<K: Key, T> IndexMut<K> for KeyedDenseVec<K, T>
impl<K: Key, T> IndexMut<K> for KeyedDenseVec<K, T>
sourceimpl<K: Key, T> IntoIterator for KeyedDenseVec<K, T>
impl<K: Key, T> IntoIterator for KeyedDenseVec<K, T>
sourceimpl<'a, K: Key, T> IntoIterator for &'a KeyedDenseVec<K, T>
impl<'a, K: Key, T> IntoIterator for &'a KeyedDenseVec<K, T>
sourceimpl<'a, K: Key, T> IntoIterator for &'a mut KeyedDenseVec<K, T>
impl<'a, K: Key, T> IntoIterator for &'a mut KeyedDenseVec<K, T>
sourceimpl<K: Key, T: PartialEq> PartialEq<KeyedDenseVec<K, T>> for KeyedDenseVec<K, T>
impl<K: Key, T: PartialEq> PartialEq<KeyedDenseVec<K, T>> for KeyedDenseVec<K, T>
impl<K: Key, T: Eq> Eq for KeyedDenseVec<K, T>
Auto Trait Implementations
impl<K, T> RefUnwindSafe for KeyedDenseVec<K, T> where
K: RefUnwindSafe,
T: RefUnwindSafe,
impl<K, T> Send for KeyedDenseVec<K, T> where
K: Send,
T: Send,
impl<K, T> Sync for KeyedDenseVec<K, T> where
K: Sync,
T: Sync,
impl<K, T> Unpin for KeyedDenseVec<K, T> where
K: Unpin,
T: Unpin,
impl<K, T> UnwindSafe for KeyedDenseVec<K, T> where
K: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more