Struct sparse_array::fast::FastSparseArray
source · pub struct FastSparseArray<V> {
index: BitmapIndex,
data: Arc<SparseArray<V>>,
}
Fields§
§index: BitmapIndex
§data: Arc<SparseArray<V>>
Implementations§
source§impl<V> FastSparseArray<V>
impl<V> FastSparseArray<V>
pub fn new() -> Self
pub fn get(&self, idx: u8) -> Option<&V>
pub fn set(&mut self, idx: u8, value: V)where V: Clone,
pub fn remove(&mut self, idx: u8) -> Option<V>where V: Clone,
pub fn is_empty(&self) -> bool
pub fn contains_key(&self, idx: u8) -> bool
pub fn iter(&self) -> FastSparseArrayIter<'_, V> ⓘ
pub fn shrink(&mut self)where V: Clone,
Trait Implementations§
source§impl<V: Clone> Clone for FastSparseArray<V>
impl<V: Clone> Clone for FastSparseArray<V>
source§fn clone(&self) -> FastSparseArray<V>
fn clone(&self) -> FastSparseArray<V>
Returns a copy 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<V: Debug> Debug for FastSparseArray<V>
impl<V: Debug> Debug for FastSparseArray<V>
source§impl<V> Default for FastSparseArray<V>
impl<V> Default for FastSparseArray<V>
source§impl<V: PartialEq> PartialEq<FastSparseArray<V>> for FastSparseArray<V>
impl<V: PartialEq> PartialEq<FastSparseArray<V>> for FastSparseArray<V>
source§fn eq(&self, other: &FastSparseArray<V>) -> bool
fn eq(&self, other: &FastSparseArray<V>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<V: Eq> Eq for FastSparseArray<V>
impl<V> StructuralEq for FastSparseArray<V>
impl<V> StructuralPartialEq for FastSparseArray<V>
Auto Trait Implementations§
impl<V> RefUnwindSafe for FastSparseArray<V>where V: RefUnwindSafe,
impl<V> Send for FastSparseArray<V>where V: Send + Sync,
impl<V> Sync for FastSparseArray<V>where V: Send + Sync,
impl<V> Unpin for FastSparseArray<V>
impl<V> UnwindSafe for FastSparseArray<V>where V: RefUnwindSafe,
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