pub struct UnsafeReadAccess<'a, T> { /* private fields */ }Expand description
A handle that can be used to read arbitrary locations in a vector wrapped by a
ParallelVecWriter, even if they weren’t
initialized when the ParallelVecWriter was created.
Implementations§
Source§impl<T> UnsafeReadAccess<'_, T>
impl<T> UnsafeReadAccess<'_, T>
Sourcepub unsafe fn get_unchecked(&self, idx: usize) -> &T
pub unsafe fn get_unchecked(&self, idx: usize) -> &T
Get a reference to the given index in the vector.
§Safety
idx must be either less than the length of the vector when the underlying
ParallelVecWriter was created, or it must be within bounds of a completed write to
ParallelVecWriter::write_contents.
Sourcepub unsafe fn get_unchecked_slice(&self, slice: Range<usize>) -> &[T]
pub unsafe fn get_unchecked_slice(&self, slice: Range<usize>) -> &[T]
Get a subslice of given index in the vector.
§Safety
slice’s contents must be either within the vector when the underlying
ParallelVecWriter was created, or they must be within bounds of a completed write to
ParallelVecWriter::write_contents.
Auto Trait Implementations§
impl<'a, T> Freeze for UnsafeReadAccess<'a, T>
impl<'a, T> RefUnwindSafe for UnsafeReadAccess<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for UnsafeReadAccess<'a, T>where
T: Sync,
impl<'a, T> Sync for UnsafeReadAccess<'a, T>where
T: Sync,
impl<'a, T> Unpin for UnsafeReadAccess<'a, T>
impl<'a, T> UnwindSafe for UnsafeReadAccess<'a, T>where
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