#[repr(transparent)]pub struct AsUninit<T>(pub T);
Tuple Fields§
§0: T
Trait Implementations§
Source§impl<T, Item> Initialize for AsUninit<T>
impl<T, Item> Initialize for AsUninit<T>
type Item = Item
Source§fn as_maybe_uninit_slice(&self) -> &[MaybeUninit<Item>]
fn as_maybe_uninit_slice(&self) -> &[MaybeUninit<Item>]
Retrieve an immutable slice pointing to possibly uninitialized memory. This must be
exactly the same slice as the one from
as_maybe_uninit_slice_mut
, or the trait
implementation as a whole, gets incorrect.Source§unsafe fn as_maybe_uninit_slice_mut(&mut self) -> &mut [MaybeUninit<Item>]
unsafe fn as_maybe_uninit_slice_mut(&mut self) -> &mut [MaybeUninit<Item>]
Retrieve a mutable slice pointing to possibly uninitialized memory. This must always
point to the same slice as with previous invocations. Read more
Auto Trait Implementations§
impl<T> Freeze for AsUninit<T>where
T: Freeze,
impl<T> RefUnwindSafe for AsUninit<T>where
T: RefUnwindSafe,
impl<T> Send for AsUninit<T>where
T: Send,
impl<T> Sync for AsUninit<T>where
T: Sync,
impl<T> Unpin for AsUninit<T>where
T: Unpin,
impl<T> UnwindSafe for AsUninit<T>where
T: UnwindSafe,
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> InitializeExt for Twhere
T: Initialize,
impl<T> InitializeExt for Twhere
T: Initialize,
Source§unsafe fn assume_init(self) -> AssertInit<Self>
unsafe fn assume_init(self) -> AssertInit<Self>
Assume that the type is already initialized. This is equivalent of calling
AssertInit::new_unchecked
. Read more