pub struct Out<'a, T: ?Sized>(/* private fields */);
Expand description
An Out Reference, you can only write to this reference using the set
method
and reborrow this reference with the borrow
method. It isn’t safe to read from
an Out
pointer.
Implementations§
Source§impl<'a, T> Out<'a, T>
impl<'a, T> Out<'a, T>
Sourcepub fn from_maybe_uninit(maybe_uninit: &mut MaybeUninit<T>) -> Out<'_, T>
pub fn from_maybe_uninit(maybe_uninit: &mut MaybeUninit<T>) -> Out<'_, T>
To allow writing to the value inside the MaybeUninit
Source§impl<'a, T: ?Sized> Out<'a, T>
impl<'a, T: ?Sized> Out<'a, T>
Sourcepub fn into_raw(self) -> *mut T
pub fn into_raw(self) -> *mut T
Convert this Out
reference into a raw pointer
see as_mut_ptr
for safety documentation of the this pointer.
Sourcepub fn as_mut_ptr(&mut self) -> *mut T
pub fn as_mut_ptr(&mut self) -> *mut T
Get a raw pointer to the Out
, it is only safe to write to this pointer
unless specified otherwise by the creator of this Out
reference
i.e. it’s safe to read to an Out<'_, T>
that was created from a &mut T
and it’s safe to read from a Out<'_, T>
that was created from a
&mut MaybeUninit<T>
after it has been initialized.
Trait Implementations§
Source§impl<'a, T> From<&'a mut MaybeUninit<T>> for Out<'a, T>
impl<'a, T> From<&'a mut MaybeUninit<T>> for Out<'a, T>
Source§fn from(ptr: &'a mut MaybeUninit<T>) -> Self
fn from(ptr: &'a mut MaybeUninit<T>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'a, T> Freeze for Out<'a, T>where
T: ?Sized,
impl<'a, T> RefUnwindSafe for Out<'a, T>where
T: RefUnwindSafe + ?Sized,
impl<'a, T> !Send for Out<'a, T>
impl<'a, T> !Sync for Out<'a, T>
impl<'a, T> Unpin for Out<'a, T>where
T: ?Sized,
impl<'a, T> !UnwindSafe for Out<'a, T>
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