pub struct SendPtr<T>(pub *mut T);Expand description
A raw pointer wrapper that is Send + Sync.
§Safety
The caller must guarantee that the pointed-to data is valid for the lifetime of any parallel operation and that no data races occur (e.g., different threads write to disjoint regions). Raw address transport for scoped kernel workers, without dereference or ownership. Storage liveness, aliasing and cross-thread access must be established at use.
§Examples
use strided_basic::execution::SendPtr;
let mut value = 1_i32;
let address = &mut value as *mut i32;
assert_eq!(SendPtr(address).as_ptr(), address);Tuple Fields§
§0: *mut TImplementations§
Trait Implementations§
impl<T> Copy for SendPtr<T>
impl<T> Send for SendPtr<T>
impl<T> Sync for SendPtr<T>
Auto Trait Implementations§
impl<T> Freeze for SendPtr<T>
impl<T> RefUnwindSafe for SendPtr<T>where
*mut T: RefUnwindSafe,
impl<T> Unpin for SendPtr<T>
impl<T> UnsafeUnpin for SendPtr<T>where
*mut T: UnsafeUnpin,
impl<T> UnwindSafe for SendPtr<T>where
*mut T: 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