Union smallvec::RawSmallVec
source · #[repr(C)]
pub union RawSmallVec<T, const N: usize> {
/* private fields */
}
Expand description
Either a stack array with length <= N
or a heap array
whose pointer and capacity are stored here.
We store a NonNull<T>
instead of a *mut T
, so that
niche-optimization can be performed and the type is covariant
with respect to T
.
Auto Trait Implementations§
impl<T, const N: usize> RefUnwindSafe for RawSmallVec<T, N>where
T: RefUnwindSafe,
impl<T, const N: usize> !Send for RawSmallVec<T, N>
impl<T, const N: usize> !Sync for RawSmallVec<T, N>
impl<T, const N: usize> Unpin for RawSmallVec<T, N>where
T: Unpin,
impl<T, const N: usize> UnwindSafe for RawSmallVec<T, N>where
T: UnwindSafe + RefUnwindSafe,
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