[−][src]Struct out_reference::Out
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
impl<'a, T> Out<'a, T>
[src]
pub fn from_maybe_uninit(maybe_uninit: &mut MaybeUninit<T>) -> Out<'_, T>
[src]
To allow writing to the value inside the MaybeUninit
impl<'a, T: ?Sized> Out<'a, T>
[src]
pub fn from_mut(value: &'a mut T) -> Self
[src]
Create Out
from exclusive reference
pub unsafe fn from_raw(ptr: *mut T) -> Out<'a, T>
[src]
Create Out
from raw pointer
pub fn borrow(&mut self) -> Out<'_, T>
[src]
Reborrows the Out
reference
pub fn into_raw(self) -> *mut T
[src]
Convert this Out
reference into a raw pointer
see as_mut_ptr
for safety documentation of the this pointer.
pub fn as_mut_ptr(&mut self) -> *mut T
[src]
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.
impl<'a, T> Out<'a, T>
[src]
pub fn set(&mut self, value: T)
[src]
Set the value behind the Out
reference *without dropping the old value *
Trait Implementations
impl<'a, T: Debug + ?Sized> Debug for Out<'a, T>
[src]
impl<'a, T> From<&'a mut MaybeUninit<T>> for Out<'a, T>
[src]
pub fn from(ptr: &'a mut MaybeUninit<T>) -> Self
[src]
impl<'a, T: ?Sized> From<&'a mut T> for Out<'a, T>
[src]
Auto Trait Implementations
impl<'a, T: ?Sized> RefUnwindSafe for Out<'a, T> where
T: RefUnwindSafe,
[src]
T: RefUnwindSafe,
impl<'a, T> !Send for Out<'a, T>
[src]
impl<'a, T> !Sync for Out<'a, T>
[src]
impl<'a, T: ?Sized> Unpin for Out<'a, T>
[src]
impl<'a, T> !UnwindSafe for Out<'a, T>
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> OutMethod for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,