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
T: RefUnwindSafe,
impl<T> Unpin for SendPtr<T>
impl<T> UnsafeUnpin for SendPtr<T>
impl<T> UnwindSafe for SendPtr<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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more