#[repr(transparent)]pub struct ArrayStorage<T, const N: usize>(pub [MaybeUninit<T>; N]);
Expand description
A storage buffer consisting of an uninitialized MaybeUnit
array.
Tuple Fields§
§0: [MaybeUninit<T>; N]
Implementations§
Source§impl<T, const N: usize> ArrayStorage<T, N>
impl<T, const N: usize> ArrayStorage<T, N>
Sourcepub fn as_uninit_slice(&mut self) -> &mut [MaybeUninit<T>]
pub fn as_uninit_slice(&mut self) -> &mut [MaybeUninit<T>]
Access the buffer contents as a mutable slice.
Trait Implementations§
Source§impl<T, const N: usize> ConstDefault for ArrayStorage<T, N>
impl<T, const N: usize> ConstDefault for ArrayStorage<T, N>
Source§impl<T, const N: usize> Debug for ArrayStorage<T, N>
impl<T, const N: usize> Debug for ArrayStorage<T, N>
Source§impl<T, const N: usize> Default for ArrayStorage<T, N>
impl<T, const N: usize> Default for ArrayStorage<T, N>
Source§impl<'a, T: 'a, const N: usize> SpillAlloc<'a> for &'a mut ArrayStorage<T, N>
impl<'a, T: 'a, const N: usize> SpillAlloc<'a> for &'a mut ArrayStorage<T, N>
Source§type NewIn<A: 'a> = SpillStorage<'a, &'a mut [MaybeUninit<T>], A>
type NewIn<A: 'a> = SpillStorage<'a, &'a mut [MaybeUninit<T>], A>
The concrete type of resulting allocation target.
Source§fn spill_alloc_in<A: Allocator + 'a>(self, alloc: A) -> Self::NewIn<A>
fn spill_alloc_in<A: Allocator + 'a>(self, alloc: A) -> Self::NewIn<A>
Consume the allocator instance, returning a new allocator
which spills into the provided allocator instance
alloc
.Source§fn spill_alloc(self) -> Self::NewIn<Global>
fn spill_alloc(self) -> Self::NewIn<Global>
Consume the allocator instance, returning a new allocator
which spills into the Global allocator.
Source§impl<'a, T, const N: usize> VecNewIn<T> for &'a mut ArrayStorage<T, N>
impl<'a, T, const N: usize> VecNewIn<T> for &'a mut ArrayStorage<T, N>
Auto Trait Implementations§
impl<T, const N: usize> Freeze for ArrayStorage<T, N>where
T: Freeze,
impl<T, const N: usize> RefUnwindSafe for ArrayStorage<T, N>where
T: RefUnwindSafe,
impl<T, const N: usize> Send for ArrayStorage<T, N>where
T: Send,
impl<T, const N: usize> Sync for ArrayStorage<T, N>where
T: Sync,
impl<T, const N: usize> Unpin for ArrayStorage<T, N>where
T: Unpin,
impl<T, const N: usize> UnwindSafe for ArrayStorage<T, N>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