pub struct ConcurrentFixedVec<T> { /* private fields */ }
Expand description
Concurrent wrapper (orx_pinned_vec::ConcurrentPinnedVec
) for the FixedVec
.
Trait Implementations§
Source§impl<T> ConcurrentPinnedVec<T> for ConcurrentFixedVec<T>
impl<T> ConcurrentPinnedVec<T> for ConcurrentFixedVec<T>
Source§type SliceIter<'a> = Option<&'a [T]>
where
T: 'a,
Self: 'a
type SliceIter<'a> = Option<&'a [T]> where T: 'a, Self: 'a
Iterator yielding slices corresponding to a range of indices, returned by the
slice
method.Source§type SliceMutIter<'a> = Option<&'a mut [T]>
where
T: 'a,
Self: 'a
type SliceMutIter<'a> = Option<&'a mut [T]> where T: 'a, Self: 'a
Iterator yielding mutable slices corresponding to a range of indices, returned by the
slice_mut
and slice_mut_unchecked
methods.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 capacity(&self) -> usize
fn capacity(&self) -> usize
Returns the current capacity of the vector, which is actually allocated.
Source§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 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,
_: F,
) -> Result<usize, PinnedVecGrowthError>where
F: Fn() -> T,
fn grow_to_and_fill_with<F>(
&self,
new_capacity: usize,
_: 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§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 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<'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 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 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§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§unsafe fn reserve_maximum_concurrent_capacity(
&mut self,
_: usize,
new_maximum_capacity: usize,
) -> usize
unsafe fn reserve_maximum_concurrent_capacity( &mut self, _: 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§impl<T> Debug for ConcurrentFixedVec<T>
impl<T> Debug for ConcurrentFixedVec<T>
Auto Trait Implementations§
impl<T> Freeze for ConcurrentFixedVec<T>
impl<T> RefUnwindSafe for ConcurrentFixedVec<T>where
T: RefUnwindSafe,
impl<T> !Send for ConcurrentFixedVec<T>
impl<T> !Sync for ConcurrentFixedVec<T>
impl<T> Unpin for ConcurrentFixedVec<T>where
T: Unpin,
impl<T> UnwindSafe for ConcurrentFixedVec<T>where
T: RefUnwindSafe + 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