pub struct DisjointMutPtr<T>(/* private fields */);Expand description
A raw mutable pointer wrapper that implements Send and Sync.
Used to enable parallel writes to disjoint slices of a pre-allocated buffer
from within closures that require Send + Sync (e.g. rayon::ParallelIterator::for_each_init).
§Safety
The caller must ensure that concurrent accesses through this pointer always target non-overlapping memory regions.
Implementations§
Source§impl<T> DisjointMutPtr<T>
impl<T> DisjointMutPtr<T>
Trait Implementations§
Source§impl<T: Clone> Clone for DisjointMutPtr<T>
impl<T: Clone> Clone for DisjointMutPtr<T>
Source§fn clone(&self) -> DisjointMutPtr<T>
fn clone(&self) -> DisjointMutPtr<T>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<T: Copy> Copy for DisjointMutPtr<T>
impl<T> Send for DisjointMutPtr<T>
impl<T> Sync for DisjointMutPtr<T>
Auto Trait Implementations§
impl<T> Freeze for DisjointMutPtr<T>
impl<T> RefUnwindSafe for DisjointMutPtr<T>where
T: RefUnwindSafe,
impl<T> Unpin for DisjointMutPtr<T>
impl<T> UnsafeUnpin for DisjointMutPtr<T>
impl<T> UnwindSafe for DisjointMutPtr<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