pub struct OutRef<'a, T> { /* private fields */ }
Expand description
A write-only reference of T
.
Implementations
sourceimpl<'a, T> OutRef<'a, T>
impl<'a, T> OutRef<'a, T>
sourcepub unsafe fn from_raw(data: *mut T) -> Self
pub unsafe fn from_raw(data: *mut T) -> Self
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>) -> Self
pub fn uninit(val: &'a mut MaybeUninit<T>) -> Self
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.
Trait Implementations
Auto Trait Implementations
impl<'a, T> RefUnwindSafe for OutRef<'a, T> where
T: RefUnwindSafe,
impl<'a, T> Unpin for OutRef<'a, T>
impl<'a, T> !UnwindSafe for OutRef<'a, T>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more