Struct orx_split_vec::ConcurrentSplitVec
source · pub struct ConcurrentSplitVec<T, G: GrowthWithConstantTimeAccess = Doubling> { /* private fields */ }
Expand description
Concurrent wrapper (orx_pinned_vec::ConcurrentPinnedVec
) for the SplitVec
.
Trait Implementations§
source§impl<T, G: GrowthWithConstantTimeAccess> ConcurrentPinnedVec<T> for ConcurrentSplitVec<T, G>
impl<T, G: GrowthWithConstantTimeAccess> ConcurrentPinnedVec<T> for ConcurrentSplitVec<T, G>
source§unsafe fn into_inner(self, len: usize) -> Self::P
unsafe fn into_inner(self, len: usize) -> Self::P
Converts back to the underlying pinned vector with the given length. Read more
source§unsafe fn clone_with_len(&self, len: usize) -> Selfwhere
T: Clone,
unsafe fn clone_with_len(&self, len: usize) -> Selfwhere
T: Clone,
Clones the concurrent pinned vector with for the first
len
elements.
The created concurrent vector will have the same capacity and maximum capacity as this collection;
however, only the values within 0..len will be cloned to the target. Read moresource§fn slices<R: RangeBounds<usize>>(
&self,
range: R,
) -> <Self::P as PinnedVec<T>>::SliceIter<'_>
fn slices<R: RangeBounds<usize>>( &self, range: R, ) -> <Self::P as PinnedVec<T>>::SliceIter<'_>
Returns an iterator of slices to the elements extending over positions
range
of the vector.source§unsafe fn iter<'a>(&'a self, len: usize) -> impl Iterator<Item = &'a T> + 'awhere
T: 'a,
unsafe fn iter<'a>(&'a self, len: usize) -> impl Iterator<Item = &'a T> + 'awhere
T: 'a,
Returns an iterator over positions
0..len
of the vector. Read moresource§unsafe fn iter_over_range<'a, R: RangeBounds<usize>>(
&'a self,
range: R,
) -> impl Iterator<Item = &'a T> + 'awhere
T: 'a,
unsafe fn iter_over_range<'a, R: RangeBounds<usize>>(
&'a self,
range: R,
) -> impl Iterator<Item = &'a T> + 'awhere
T: 'a,
Returns an iterator over positions
range
of the vector. Read moresource§unsafe fn slices_mut<R: RangeBounds<usize>>(
&self,
range: R,
) -> <Self::P as PinnedVec<T>>::SliceMutIter<'_>
unsafe fn slices_mut<R: RangeBounds<usize>>( &self, range: R, ) -> <Self::P as PinnedVec<T>>::SliceMutIter<'_>
Returns an iterator of mutable slices to the elements extending over positions
range
of the vector. Read moresource§unsafe fn iter_mut<'a>(
&'a mut self,
len: usize,
) -> impl Iterator<Item = &'a mut T> + 'awhere
T: 'a,
unsafe fn iter_mut<'a>(
&'a mut self,
len: usize,
) -> impl Iterator<Item = &'a mut T> + 'awhere
T: 'a,
Returns a mutable iterator over positions
0..len
of the vector. Read moresource§unsafe fn get(&self, index: usize) -> Option<&T>
unsafe fn get(&self, index: usize) -> Option<&T>
Returns a reference to the element at the
index
-th position. Read moresource§unsafe fn get_mut(&mut self, index: usize) -> Option<&mut T>
unsafe fn get_mut(&mut self, index: usize) -> Option<&mut T>
Returns a reference to the element at the
index
-th position. Read moresource§unsafe fn get_ptr_mut(&self, index: usize) -> *mut T
unsafe fn get_ptr_mut(&self, index: usize) -> *mut T
Returns a mutable reference to the element at the
index
-th position. Read moresource§fn max_capacity(&self) -> usize
fn max_capacity(&self) -> usize
Returns the maximum possible capacity that the vector can concurrently grow to without requiring a
&mut self
reference. Read moresource§fn capacity(&self) -> usize
fn capacity(&self) -> usize
Returns the current capacity of the vector, which is actually allocated.
source§fn grow_to(&self, new_capacity: usize) -> Result<usize, PinnedVecGrowthError>
fn grow_to(&self, new_capacity: usize) -> Result<usize, PinnedVecGrowthError>
Tries to concurrently grow the capacity of the vector to at least
new_capacity
. Returns: Read moresource§fn grow_to_and_fill_with<F>(
&self,
new_capacity: usize,
fill_with: F,
) -> Result<usize, PinnedVecGrowthError>where
F: Fn() -> T,
fn grow_to_and_fill_with<F>(
&self,
new_capacity: usize,
fill_with: F,
) -> Result<usize, PinnedVecGrowthError>where
F: Fn() -> T,
Tries to concurrently grow the capacity of the vector to at least
new_capacity
. Returns: Read moresource§fn fill_with<F>(&self, range: Range<usize>, fill_with: F)where
F: Fn() -> T,
fn fill_with<F>(&self, range: Range<usize>, fill_with: F)where
F: Fn() -> T,
Fills the provided
range
with elements created by successively calling the fill_with
function.source§unsafe fn reserve_maximum_concurrent_capacity(
&mut self,
_current_len: usize,
new_maximum_capacity: usize,
) -> usize
unsafe fn reserve_maximum_concurrent_capacity( &mut self, _current_len: usize, new_maximum_capacity: usize, ) -> usize
source§unsafe fn reserve_maximum_concurrent_capacity_fill_with<F>(
&mut self,
current_len: usize,
new_maximum_capacity: usize,
_fill_with: F,
) -> usizewhere
F: Fn() -> T,
unsafe fn reserve_maximum_concurrent_capacity_fill_with<F>(
&mut self,
current_len: usize,
new_maximum_capacity: usize,
_fill_with: F,
) -> usizewhere
F: Fn() -> T,
Increases the
maximum_capacity
to the new_maximum_capacity
.
If capacity extension leads to allocation, allocated memory is filled with the given function. Read moresource§unsafe fn set_pinned_vec_len(&mut self, len: usize)
unsafe fn set_pinned_vec_len(&mut self, len: usize)
Sets the length of the underlying pinned vector to the given
len
. Read moresource§impl<T, G: GrowthWithConstantTimeAccess> Drop for ConcurrentSplitVec<T, G>
impl<T, G: GrowthWithConstantTimeAccess> Drop for ConcurrentSplitVec<T, G>
source§impl<T, G: GrowthWithConstantTimeAccess> From<SplitVec<T, G>> for ConcurrentSplitVec<T, G>
impl<T, G: GrowthWithConstantTimeAccess> From<SplitVec<T, G>> for ConcurrentSplitVec<T, G>
Auto Trait Implementations§
impl<T, G = Doubling> !Freeze for ConcurrentSplitVec<T, G>
impl<T, G = Doubling> !RefUnwindSafe for ConcurrentSplitVec<T, G>
impl<T, G = Doubling> !Send for ConcurrentSplitVec<T, G>
impl<T, G = Doubling> !Sync for ConcurrentSplitVec<T, G>
impl<T, G> Unpin for ConcurrentSplitVec<T, G>where
G: Unpin,
impl<T, G> UnwindSafe for ConcurrentSplitVec<T, G>where
G: UnwindSafe,
T: 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