pub struct SparseCollection<T> { /* private fields */ }Expand description
Present records in input order plus a hole COUNT (#8042, #8114).
Canonical sorting moves every hole after the records, and the stable sort keeps the present records’ relative order whatever the hole positions, so positions are not content: equality ignores them. Counting instead of storing keeps memory O(present) for any array length, including a valid 2^32 - 1 slot array, while cardinality stays exact.
Implementations§
Source§impl<T> SparseCollection<T>
impl<T> SparseCollection<T>
Trait Implementations§
Source§impl<T: Clone> Clone for SparseCollection<T>
impl<T: Clone> Clone for SparseCollection<T>
Source§fn clone(&self) -> SparseCollection<T>
fn clone(&self) -> SparseCollection<T>
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<T: Debug> Debug for SparseCollection<T>
impl<T: Debug> Debug for SparseCollection<T>
Source§impl<T> Default for SparseCollection<T>
impl<T> Default for SparseCollection<T>
Source§impl<'de, T: Deserialize<'de>> Deserialize<'de> for SparseCollection<T>
impl<'de, T: Deserialize<'de>> Deserialize<'de> for SparseCollection<T>
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl<T> From<Vec<T>> for SparseCollection<T>
impl<T> From<Vec<T>> for SparseCollection<T>
Source§impl<T> FromIterator<Slot<T>> for SparseCollection<T>
impl<T> FromIterator<Slot<T>> for SparseCollection<T>
Source§impl<T> FromIterator<T> for SparseCollection<T>
impl<T> FromIterator<T> for SparseCollection<T>
Source§fn from_iter<I: IntoIterator<Item = T>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = T>>(iter: I) -> Self
Creates a value from an iterator. Read more
Source§impl<T: PartialEq> PartialEq for SparseCollection<T>
impl<T: PartialEq> PartialEq for SparseCollection<T>
impl<T> StructuralPartialEq for SparseCollection<T>
Auto Trait Implementations§
impl<T> Freeze for SparseCollection<T>
impl<T> RefUnwindSafe for SparseCollection<T>where
T: RefUnwindSafe,
impl<T> Send for SparseCollection<T>where
T: Send,
impl<T> Sync for SparseCollection<T>where
T: Sync,
impl<T> Unpin for SparseCollection<T>where
T: Unpin,
impl<T> UnwindSafe for SparseCollection<T>where
T: 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