Union smallvec::SmallVecData
source · pub(crate) union SmallVecData<A: Array> {
pub(crate) inline: ManuallyDrop<MaybeUninit<A>>,
pub(crate) heap: (NonNull<A::Item>, usize),
}
Fields§
§inline: ManuallyDrop<MaybeUninit<A>>
§heap: (NonNull<A::Item>, usize)
Implementations§
source§impl<T, const N: usize> SmallVecData<[T; N]>
impl<T, const N: usize> SmallVecData<[T; N]>
pub(crate) const fn from_const(inline: MaybeUninit<[T; N]>) -> Self
source§impl<A: Array> SmallVecData<A>
impl<A: Array> SmallVecData<A>
pub(crate) unsafe fn inline(&self) -> ConstNonNull<A::Item>
pub(crate) unsafe fn inline_mut(&mut self) -> NonNull<A::Item>
pub(crate) fn from_inline(inline: MaybeUninit<A>) -> SmallVecData<A>
pub(crate) unsafe fn into_inline(self) -> MaybeUninit<A>
pub(crate) unsafe fn heap(&self) -> (ConstNonNull<A::Item>, usize)
pub(crate) unsafe fn heap_mut(&mut self) -> (NonNull<A::Item>, &mut usize)
pub(crate) fn from_heap(ptr: NonNull<A::Item>, len: usize) -> SmallVecData<A>
Trait Implementations§
impl<A: Array + Send> Send for SmallVecData<A>
impl<A: Array + Sync> Sync for SmallVecData<A>
Auto Trait Implementations§
impl<A> Freeze for SmallVecData<A>where
A: Freeze,
impl<A> RefUnwindSafe for SmallVecData<A>
impl<A> Unpin for SmallVecData<A>where
A: Unpin,
impl<A> UnwindSafe for SmallVecData<A>
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