pub struct PagedSparseMap<K, V, const PAGE: usize = DEFAULT_PAGE, D: Directory = Flat> { /* private fields */ }Expand description
A map from Keys to values with O(1) insert, remove and lookup, and
contiguous arrays of its keys and values.
PAGE and D are as for PagedSparseSet: slots per page of the
sparse index, and the page directory (Flat by default,
Radix for wide keys, or
Tree). See crate::page.
Entries are kept in insertion order until a removal, which moves the last entry into the gap. See the module docs for how methods treat a slot held by another generation of a key.
Implementations§
Source§impl<K: Key, V, const PAGE: usize, D: Directory> PagedSparseMap<K, V, PAGE, D>
impl<K: Key, V, const PAGE: usize, D: Directory> PagedSparseMap<K, V, PAGE, D>
Sourcepub fn par_keys(&self) -> Iter<'_, K>where
K: Sync,
Available on crate feature rayon only.
pub fn par_keys(&self) -> Iter<'_, K>where
K: Sync,
rayon only.Iterates in parallel over the keys in dense order.
Sourcepub fn par_values(&self) -> Iter<'_, V>where
V: Sync,
Available on crate feature rayon only.
pub fn par_values(&self) -> Iter<'_, V>where
V: Sync,
rayon only.Iterates in parallel over the values in dense order.
Sourcepub fn par_values_mut(&mut self) -> IterMut<'_, V>where
V: Send,
Available on crate feature rayon only.
pub fn par_values_mut(&mut self) -> IterMut<'_, V>where
V: Send,
rayon only.Iterates in parallel over mutable values in dense order.
Source§impl<K: Key, V, const PAGE: usize, D: Directory> PagedSparseMap<K, V, PAGE, D>
impl<K: Key, V, const PAGE: usize, D: Directory> PagedSparseMap<K, V, PAGE, D>
Sourcepub fn with_capacity(capacity: usize) -> Self
pub fn with_capacity(capacity: usize) -> Self
Creates an empty map whose dense arrays can hold capacity entries
without reallocating. Pages are still allocated on demand.
Sourcepub fn capacity(&self) -> usize
pub fn capacity(&self) -> usize
Number of entries the dense arrays can hold without reallocating.
Sourcepub fn allocated_pages(&self) -> usize
pub fn allocated_pages(&self) -> usize
Number of allocated pages in the sparse index.
Sourcepub fn reserve(&mut self, additional: usize)
pub fn reserve(&mut self, additional: usize)
Reserves room in the dense arrays for at least additional more
entries.
Sourcepub fn try_reserve(&mut self, additional: usize) -> Result<(), TryReserveError>
pub fn try_reserve(&mut self, additional: usize) -> Result<(), TryReserveError>
Like reserve, but returns an error instead of
panicking or aborting when the capacity overflows or the allocation
fails. On error, one of the arrays may have grown.
Sourcepub fn as_set(&self) -> &PagedSparseSet<K, PAGE, D>
pub fn as_set(&self) -> &PagedSparseSet<K, PAGE, D>
The keys as a set.
Gives read access to the set’s lookups, such as
occupant.
Sourcepub fn position(&self, key: K) -> Option<usize>
pub fn position(&self, key: K) -> Option<usize>
Dense position of key, if it is in the map.
Positions index key_slice and
value_slice, and change when entries are removed
or the map is sorted.
Sourcepub fn contains_key(&self, key: K) -> bool
pub fn contains_key(&self, key: K) -> bool
Whether key is in the map.
Sourcepub fn get_mut(&mut self, key: K) -> Option<&mut V>
pub fn get_mut(&mut self, key: K) -> Option<&mut V>
Mutable access to the value for key, if it is in the map.
Sourcepub fn get_key_value(&self, key: K) -> Option<(&K, &V)>
pub fn get_key_value(&self, key: K) -> Option<(&K, &V)>
The stored key equal to key and its value, if it is in the map.
Sourcepub fn occupant(&self, index: usize) -> Option<(&K, &V)>
pub fn occupant(&self, index: usize) -> Option<(&K, &V)>
The entry occupying slot index, if any.
With generational keys this finds whichever generation is present.
Sourcepub fn occupant_mut(&mut self, index: usize) -> Option<(&K, &mut V)>
pub fn occupant_mut(&mut self, index: usize) -> Option<(&K, &mut V)>
The entry occupying slot index, with mutable access to its value.
Sourcepub fn insert(&mut self, key: K, value: V) -> Option<V>
pub fn insert(&mut self, key: K, value: V) -> Option<V>
Stores value for key and returns the value previously in key’s
slot.
If key is present its value is replaced and the key is kept. If the
slot is held by a different key (another generation), that entry is
evicted and its value returned; use replace to get
the evicted key too, or try_insert to refuse.
§Panics
Panics if the map already holds u32::MAX entries, or if a page, the
directory or a dense array cannot be allocated. The entries are then
unchanged, though capacity or allocated pages may have grown.
Sourcepub fn try_insert(&mut self, key: K, value: V) -> Result<&mut V, V>
pub fn try_insert(&mut self, key: K, value: V) -> Result<&mut V, V>
Sourcepub fn get_or_insert_with(&mut self, key: K, make: impl FnOnce() -> V) -> &mut V
pub fn get_or_insert_with(&mut self, key: K, make: impl FnOnce() -> V) -> &mut V
Sourcepub fn entry(&mut self, key: K) -> Entry<'_, K, V, PAGE, D>
pub fn entry(&mut self, key: K) -> Entry<'_, K, V, PAGE, D>
The entry for key, for in-place access or insertion.
Entry::Occupied holds the exact stored key. If another generation
holds the slot, this returns Entry::Vacant. Inserting through it
evicts that generation and keeps its dense position, as
insert does.
§Examples
use paged_collections::sparse_map::PagedSparseMap;
let mut counts: PagedSparseMap<usize, u32> = PagedSparseMap::new();
for key in [3, 1, 3, 3] {
counts.entry(key).and_modify(|n| *n += 1).or_insert(1);
}
assert_eq!((counts[3], counts[1]), (3, 1));Sourcepub fn remove(&mut self, key: K) -> Option<V>
pub fn remove(&mut self, key: K) -> Option<V>
Removes key and returns its value, if it was present.
The last entry moves into the removed entry’s position.
Sourcepub fn remove_entry(&mut self, key: K) -> Option<(K, V)>
pub fn remove_entry(&mut self, key: K) -> Option<(K, V)>
Removes key and returns the stored key and its value, if it was
present.
Sourcepub fn remove_occupant(&mut self, index: usize) -> Option<(K, V)>
pub fn remove_occupant(&mut self, index: usize) -> Option<(K, V)>
Removes whichever entry occupies slot index and returns it.
Sourcepub fn retain(&mut self, keep: impl FnMut(&K, &mut V) -> bool)
pub fn retain(&mut self, keep: impl FnMut(&K, &mut V) -> bool)
Keeps only the entries for which keep returns true.
keep is called once per entry. Kept entries may change position. If
keep or a value’s drop panics, the entries not yet visited are
kept and the map stays consistent.
Sourcepub fn clear(&mut self)
pub fn clear(&mut self)
Removes every entry. The sparse index is cleared in O(1); the values are dropped.
Pages stay allocated for reuse; use reset to free
them.
Sourcepub fn reset(&mut self)
pub fn reset(&mut self)
Removes every entry and frees every page. The dense arrays keep their capacity.
Sourcepub fn shrink_to_fit(&mut self)
pub fn shrink_to_fit(&mut self)
Shrinks the dense arrays and the page directory. Frees every page if the map is empty.
Sourcepub fn value_slice(&self) -> &[V]
pub fn value_slice(&self) -> &[V]
The values as a slice, in dense order: value_slice()[i] belongs to
key_slice()[i].
Sourcepub fn value_slice_mut(&mut self) -> &mut [V]
pub fn value_slice_mut(&mut self) -> &mut [V]
The values as a mutable slice, in dense order.
Sourcepub fn values_mut(&mut self) -> IterMut<'_, V> ⓘ
pub fn values_mut(&mut self) -> IterMut<'_, V> ⓘ
Iterates mutably over the values in dense order.
Sourcepub fn iter_mut(&mut self) -> IterMut<'_, K, V> ⓘ
pub fn iter_mut(&mut self) -> IterMut<'_, K, V> ⓘ
Iterates over the entries in dense order, with mutable access to the values.
Sourcepub fn drain(&mut self) -> Drain<'_, K, V> ⓘ
pub fn drain(&mut self) -> Drain<'_, K, V> ⓘ
Removes every entry and returns them in dense order.
The map is empty as soon as this returns, even if the iterator is
leaked; dropping it drops the entries not yet yielded. Pages and the
dense arrays’ capacity are kept, as with clear.
use paged_collections::sparse_map::PagedSparseMap;
let mut map: PagedSparseMap<u32, char> = [(5, 'a'), (1, 'b')].into_iter().collect();
assert_eq!(map.drain().collect::<Vec<_>>(), [(5, 'a'), (1, 'b')]);
assert!(map.is_empty() && map.get(5).is_none());Sourcepub fn extract_if<F: FnMut(&K, &mut V) -> bool>(
&mut self,
pred: F,
) -> ExtractIf<'_, K, V, F, PAGE, D> ⓘ
pub fn extract_if<F: FnMut(&K, &mut V) -> bool>( &mut self, pred: F, ) -> ExtractIf<'_, K, V, F, PAGE, D> ⓘ
Removes the entries for which pred returns true and yields them.
Each entry is tested exactly once. A removal moves the last entry into
the gap, so entries are tested in dense order except that a moved
entry is tested next. Entries not yet tested when the iterator is
dropped stay in the map; use retain if the removed
entries are not needed.
use paged_collections::sparse_map::PagedSparseMap;
let mut map: PagedSparseMap<u32, u32> = (0..6).map(|k| (k, k * 10)).collect();
let mut big: Vec<(u32, u32)> = map.extract_if(|_, v| *v >= 30).collect();
big.sort();
assert_eq!(big, [(3, 30), (4, 40), (5, 50)]);
assert_eq!(map.len(), 3);Sourcepub fn get_disjoint_mut<const N: usize>(
&mut self,
keys: [K; N],
) -> [Option<&mut V>; N]
pub fn get_disjoint_mut<const N: usize>( &mut self, keys: [K; N], ) -> [Option<&mut V>; N]
The values of several keys at once, mutably: None for each key that
is not in the map. O(N log N) for N keys.
use paged_collections::sparse_map::PagedSparseMap;
let mut map: PagedSparseMap<u32, u32> = [(1, 10), (2, 20)].into_iter().collect();
if let [Some(a), Some(b), None] = map.get_disjoint_mut([1, 2, 3]) {
core::mem::swap(a, b);
}
assert_eq!((map[1], map[2]), (20, 10));§Panics
Panics if a key in the map is given twice.
Sourcepub fn range(&self, keys: impl RangeBounds<K>) -> Range<'_, K, V, PAGE, D> ⓘ
pub fn range(&self, keys: impl RangeBounds<K>) -> Range<'_, K, V, PAGE, D> ⓘ
Iterates over the entries whose slot index lies between the slot indices of the bounds, in slot-index order.
The bounds are keys, compared by Key::index: for plain integer
keys this is the usual key range, independent of dense order. A
generational key bounds by its index only. An empty or inverted range
yields nothing.
This walks the sparse index: it costs O(pages and slots in the
range), including slots left stale by clear (which
reset frees), not O(entries yielded).
use paged_collections::sparse_map::PagedSparseMap;
let map: PagedSparseMap<u32, char, 4> =
[(9, 'c'), (2, 'a'), (30, 'd'), (5, 'b')].into_iter().collect();
let keys: Vec<u32> = map.range(3..).map(|(&k, _)| k).collect();
assert_eq!(keys, [5, 9, 30]);
assert_eq!(map.first_key_value(), Some((&2, &'a')));
assert_eq!(map.prev_occupant(8), Some((&5, &'b')));Sourcepub fn first_key_value(&self) -> Option<(&K, &V)>
pub fn first_key_value(&self) -> Option<(&K, &V)>
The entry with the smallest slot index. Costs as
range.
Sourcepub fn last_key_value(&self) -> Option<(&K, &V)>
pub fn last_key_value(&self) -> Option<(&K, &V)>
The entry with the largest slot index. Costs as
range.
Sourcepub fn next_occupant(&self, index: usize) -> Option<(&K, &V)>
pub fn next_occupant(&self, index: usize) -> Option<(&K, &V)>
The entry at slot index or the first one after it.
Sourcepub fn prev_occupant(&self, index: usize) -> Option<(&K, &V)>
pub fn prev_occupant(&self, index: usize) -> Option<(&K, &V)>
The entry at slot index or the last one before it.
Sourcepub fn pop_first(&mut self) -> Option<(K, V)>
pub fn pop_first(&mut self) -> Option<(K, V)>
Removes and returns the entry with the smallest slot index.
Sourcepub fn pop_last(&mut self) -> Option<(K, V)>
pub fn pop_last(&mut self) -> Option<(K, V)>
Removes and returns the entry with the largest slot index.
Sourcepub fn into_values(self) -> IntoIter<V> ⓘ
pub fn into_values(self) -> IntoIter<V> ⓘ
Consumes the map and returns its values in dense order.
Sourcepub fn sort_by(&mut self, compare: impl FnMut((&K, &V), (&K, &V)) -> Ordering)
pub fn sort_by(&mut self, compare: impl FnMut((&K, &V), (&K, &V)) -> Ordering)
Sorts the entries by compare, keeping the order of equal entries,
and updates the index.
If compare panics, the dense order and the key-value pairing are
unchanged (values that compare changed through interior mutability
stay changed).
Sourcepub fn sort_by_key<T: Ord>(&mut self, f: impl FnMut(&K, &V) -> T)
pub fn sort_by_key<T: Ord>(&mut self, f: impl FnMut(&K, &V) -> T)
Sorts the entries by a key function, keeping the order of entries with equal sort keys, and updates the index.
f may be called more than once per entry. If it panics, the dense
order and the key-value pairing are unchanged.
Sourcepub fn sort_by_cached_key<T: Ord>(&mut self, f: impl FnMut(&K, &V) -> T)
pub fn sort_by_cached_key<T: Ord>(&mut self, f: impl FnMut(&K, &V) -> T)
Sorts the entries by a key function that is called at most once per
entry (not at all when there is nothing to compare), keeping the order of entries with equal sort keys, and updates the
index. Use it when f is expensive.
If f panics, the dense order and the key-value pairing are
unchanged.
Sourcepub fn sort_keys(&mut self)where
K: Ord,
pub fn sort_keys(&mut self)where
K: Ord,
Sorts the entries by key in ascending order, keeping the order of entries with equal keys, and updates the index.
Stable, which matters only if equal keys can be told apart; prefer
sort_unstable_keys otherwise.
Sourcepub fn binary_search_key(&self, key: &K) -> Result<usize, usize>where
K: Ord,
pub fn binary_search_key(&self, key: &K) -> Result<usize, usize>where
K: Ord,
Binary searches the dense order for key, which must be sorted by
key in ascending order (as after
sort_unstable_keys).
Returns Ok with the dense position of an entry whose key equals
key, or Err with the position where such an entry would keep the
order. If the entries are not sorted the result is unspecified.
For an exact lookup position is O(1); this is for
the neighbours of a key that may be absent: the entries before the
returned position have smaller keys, those from it on have keys at
least as large.
Sourcepub fn binary_search_by(
&self,
compare: impl FnMut(&K, &V) -> Ordering,
) -> Result<usize, usize>
pub fn binary_search_by( &self, compare: impl FnMut(&K, &V) -> Ordering, ) -> Result<usize, usize>
Binary searches the dense order with a comparator, as
[T]::binary_search_by: compare returns the ordering of an
entry relative to the target. The entries must be sorted consistently
with it; otherwise the result is unspecified.
Sourcepub fn partition_point(&self, pred: impl FnMut(&K, &V) -> bool) -> usize
pub fn partition_point(&self, pred: impl FnMut(&K, &V) -> bool) -> usize
The dense position of the first entry for which pred is false,
assuming the entries are partitioned: pred holds for a prefix and
for nothing after it. As [T]::partition_point.
Sourcepub fn sort_unstable_by(
&mut self,
compare: impl FnMut((&K, &V), (&K, &V)) -> Ordering,
)
pub fn sort_unstable_by( &mut self, compare: impl FnMut((&K, &V), (&K, &V)) -> Ordering, )
Sorts the entries by compare (unstable) and updates the index.
If compare panics, the dense order and the key-value pairing are
unchanged (values that compare changed through interior mutability
stay changed).
Sourcepub fn sort_unstable_by_key<T: Ord>(&mut self, f: impl FnMut(&K, &V) -> T)
pub fn sort_unstable_by_key<T: Ord>(&mut self, f: impl FnMut(&K, &V) -> T)
Sorts the entries by a key function (unstable) and updates the index.
f may be called more than once per entry. If it panics, the dense
order and the key-value pairing are unchanged.
Sourcepub fn sort_unstable_keys(&mut self)where
K: Ord,
pub fn sort_unstable_keys(&mut self)where
K: Ord,
Sorts the entries by key in ascending order (unstable) and updates the index.
Trait Implementations§
Source§impl<K: Key, V: Clone, const PAGE: usize, D: Directory> Clone for PagedSparseMap<K, V, PAGE, D>
impl<K: Key, V: Clone, const PAGE: usize, D: Directory> Clone for PagedSparseMap<K, V, PAGE, D>
Source§impl<K: Key + Debug, V: Debug, const PAGE: usize, D: Directory> Debug for PagedSparseMap<K, V, PAGE, D>
impl<K: Key + Debug, V: Debug, const PAGE: usize, D: Directory> Debug for PagedSparseMap<K, V, PAGE, D>
Source§impl<'de, K, V, const PAGE: usize, D> Deserialize<'de> for PagedSparseMap<K, V, PAGE, D>
Available on crate feature serde only.Deserializes from a map. Entries are inserted in input order with
insert, so a later entry overwrites an
earlier one in the same slot, as HashMap keeps the last duplicate.
impl<'de, K, V, const PAGE: usize, D> Deserialize<'de> for PagedSparseMap<K, V, PAGE, D>
serde only.Deserializes from a map. Entries are inserted in input order with
insert, so a later entry overwrites an
earlier one in the same slot, as HashMap keeps the last duplicate.
Memory follows the key indices, not the input length: see the
warning on PagedSparseSet’s Deserialize impl. For untrusted
input, use Radix or Tree,
or validate the keys first.
Source§fn deserialize<De: Deserializer<'de>>(
deserializer: De,
) -> Result<Self, De::Error>
fn deserialize<De: Deserializer<'de>>( deserializer: De, ) -> Result<Self, De::Error>
impl<K: Key, V: Eq, const PAGE: usize, D: Directory> Eq for PagedSparseMap<K, V, PAGE, D>
Source§impl<'a, K: Key + 'a, V: Copy + 'a, const PAGE: usize, D: Directory> Extend<(&'a K, &'a V)> for PagedSparseMap<K, V, PAGE, D>
impl<'a, K: Key + 'a, V: Copy + 'a, const PAGE: usize, D: Directory> Extend<(&'a K, &'a V)> for PagedSparseMap<K, V, PAGE, D>
Source§fn extend<I: IntoIterator<Item = (&'a K, &'a V)>>(&mut self, iter: I)
fn extend<I: IntoIterator<Item = (&'a K, &'a V)>>(&mut self, iter: I)
Source§fn extend_one(&mut self, item: T)
fn extend_one(&mut self, item: T)
extend_one)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one)Source§impl<K: Key, V, const PAGE: usize, D: Directory> Extend<(K, V)> for PagedSparseMap<K, V, PAGE, D>
Inserts each entry with insert, so later
entries overwrite earlier ones in the same slot.
impl<K: Key, V, const PAGE: usize, D: Directory> Extend<(K, V)> for PagedSparseMap<K, V, PAGE, D>
Inserts each entry with insert, so later
entries overwrite earlier ones in the same slot.
Source§fn extend<I: IntoIterator<Item = (K, V)>>(&mut self, iter: I)
fn extend<I: IntoIterator<Item = (K, V)>>(&mut self, iter: I)
Source§fn extend_one(&mut self, item: T)
fn extend_one(&mut self, item: T)
extend_one)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one)Source§impl<K: Key, V, const PAGE: usize, D: SharedDirectory> From<PagedSparseMap<K, V, PAGE, D>> for ConcurrentSparseMap<K, V, PAGE, D>
Available on crate feature concurrent only.
impl<K: Key, V, const PAGE: usize, D: SharedDirectory> From<PagedSparseMap<K, V, PAGE, D>> for ConcurrentSparseMap<K, V, PAGE, D>
concurrent only.Source§fn from(inner: PagedSparseMap<K, V, PAGE, D>) -> Self
fn from(inner: PagedSparseMap<K, V, PAGE, D>) -> Self
Source§impl<K: Key, V, const PAGE: usize, D: Directory> FromIterator<(K, V)> for PagedSparseMap<K, V, PAGE, D>
impl<K: Key, V, const PAGE: usize, D: Directory> FromIterator<(K, V)> for PagedSparseMap<K, V, PAGE, D>
Source§impl<K: Key + Hash, V: Hash, const PAGE: usize, D: Directory> Hash for PagedSparseMap<K, V, PAGE, D>
Hashes the key-value pairs in any order, consistent with PartialEq.
impl<K: Key + Hash, V: Hash, const PAGE: usize, D: Directory> Hash for PagedSparseMap<K, V, PAGE, D>
Hashes the key-value pairs in any order, consistent with PartialEq.
Source§impl<K: Key, V, const PAGE: usize, D: Directory> Index<K> for PagedSparseMap<K, V, PAGE, D>
map[key] returns the value for key.
impl<K: Key, V, const PAGE: usize, D: Directory> Index<K> for PagedSparseMap<K, V, PAGE, D>
map[key] returns the value for key.
§Panics
Panics if key is not in the map.
Source§impl<'a, K: Key, V, const PAGE: usize, D: Directory> IntoIterator for &'a PagedSparseMap<K, V, PAGE, D>
impl<'a, K: Key, V, const PAGE: usize, D: Directory> IntoIterator for &'a PagedSparseMap<K, V, PAGE, D>
Source§impl<'a, K: Key, V, const PAGE: usize, D: Directory> IntoIterator for &'a mut PagedSparseMap<K, V, PAGE, D>
impl<'a, K: Key, V, const PAGE: usize, D: Directory> IntoIterator for &'a mut PagedSparseMap<K, V, PAGE, D>
Source§impl<K: Key, V, const PAGE: usize, D: Directory> IntoIterator for PagedSparseMap<K, V, PAGE, D>
impl<K: Key, V, const PAGE: usize, D: Directory> IntoIterator for PagedSparseMap<K, V, PAGE, D>
Source§impl<'a, K: Key + Sync, V: Sync, const PAGE: usize, D: Directory> IntoParallelIterator for &'a PagedSparseMap<K, V, PAGE, D>
Available on crate feature rayon only.
impl<'a, K: Key + Sync, V: Sync, const PAGE: usize, D: Directory> IntoParallelIterator for &'a PagedSparseMap<K, V, PAGE, D>
rayon only.Source§impl<'a, K: Key + Sync, V: Send, const PAGE: usize, D: Directory> IntoParallelIterator for &'a mut PagedSparseMap<K, V, PAGE, D>
Available on crate feature rayon only.
impl<'a, K: Key + Sync, V: Send, const PAGE: usize, D: Directory> IntoParallelIterator for &'a mut PagedSparseMap<K, V, PAGE, D>
rayon only.Source§impl<K: Key, V: PartialEq<W>, W, const PAGE: usize, D: Directory, const P2: usize, D2: Directory> PartialEq<PagedSparseMap<K, W, P2, D2>> for PagedSparseMap<K, V, PAGE, D>
Compares values by exact key using get, in any
order and across page sizes and directories.
impl<K: Key, V: PartialEq<W>, W, const PAGE: usize, D: Directory, const P2: usize, D2: Directory> PartialEq<PagedSparseMap<K, W, P2, D2>> for PagedSparseMap<K, V, PAGE, D>
Compares values by exact key using get, in any
order and across page sizes and directories.
Auto Trait Implementations§
impl<K, V, const PAGE: usize, D> Forget for PagedSparseMap<K, V, PAGE, D>
impl<K, V, const PAGE: usize, D> Freeze for PagedSparseMap<K, V, PAGE, D>
impl<K, V, const PAGE: usize, D> Move for PagedSparseMap<K, V, PAGE, D>
impl<K, V, const PAGE: usize, D> RefUnwindSafe for PagedSparseMap<K, V, PAGE, D>
impl<K, V, const PAGE: usize, D> Send for PagedSparseMap<K, V, PAGE, D>
impl<K, V, const PAGE: usize, D> Sync for PagedSparseMap<K, V, PAGE, D>
impl<K, V, const PAGE: usize, D> Unpin for PagedSparseMap<K, V, PAGE, D>
impl<K, V, const PAGE: usize, D> UnsafeUnpin for PagedSparseMap<K, V, PAGE, D>
impl<K, V, const PAGE: usize, D> UnwindSafe for PagedSparseMap<K, V, PAGE, D>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<'data, I> IntoParallelRefIterator<'data> for I
impl<'data, I> IntoParallelRefIterator<'data> for I
Source§impl<'data, I> IntoParallelRefMutIterator<'data> for I
impl<'data, I> IntoParallelRefMutIterator<'data> for I
Source§type Iter = <&'data mut I as IntoParallelIterator>::Iter
type Iter = <&'data mut I as IntoParallelIterator>::Iter
Source§type Item = <&'data mut I as IntoParallelIterator>::Item
type Item = <&'data mut I as IntoParallelIterator>::Item
&'data mut T reference.Source§fn par_iter_mut(
&'data mut self,
) -> <I as IntoParallelRefMutIterator<'data>>::Iter
fn par_iter_mut( &'data mut self, ) -> <I as IntoParallelRefMutIterator<'data>>::Iter
self. Read more