Struct simd_abstraction::tools::OutRef
source · pub struct OutRef<'a, T> { /* private fields */ }
Expand description
A write-only reference of T
.
Implementations§
source§impl<'a, T> OutRef<'a, T>
impl<'a, T> OutRef<'a, T>
sourcepub unsafe fn from_raw(data: *mut T) -> OutRef<'a, T>
pub unsafe fn from_raw(data: *mut T) -> OutRef<'a, T>
Forms an OutRef<'a, T>
.
Safety
Behavior is undefined if any of the following conditions are violated:
-
data
must be valid for writes. -
data
must be properly aligned.
sourcepub fn uninit(val: &'a mut MaybeUninit<T>) -> OutRef<'a, T>
pub fn uninit(val: &'a mut MaybeUninit<T>) -> OutRef<'a, T>
Forms an OutBuf
from an uninitialized value.
sourcepub fn as_mut_ptr(&mut self) -> *mut T
pub fn as_mut_ptr(&mut self) -> *mut T
Returns an unsafe mutable pointer to the value.