#[repr(C)]
pub union FixedArray<T, const N: usize>{
/* private fields */
}
Expand description
A fixed-size array that switches between ShortArray
and LongArray
based on the size.
The size of the array is public.
§Invariants
if N <= SHORT_ARRAY_THRESHOLD
, then ShortArray
is used, otherwise LongArray
is used.
Implementations§
Source§impl<T, const N: usize> FixedArray<T, N>
impl<T, const N: usize> FixedArray<T, N>
Trait Implementations§
Source§impl<T, const N: usize> Debug for FixedArray<T, N>
impl<T, const N: usize> Debug for FixedArray<T, N>
Source§impl<T, const N: usize> Drop for FixedArray<T, N>
impl<T, const N: usize> Drop for FixedArray<T, N>
Auto Trait Implementations§
impl<T, const N: usize> Freeze for FixedArray<T, N>where
T: Freeze,
impl<T, const N: usize> !RefUnwindSafe for FixedArray<T, N>
impl<T, const N: usize> !Send for FixedArray<T, N>
impl<T, const N: usize> !Sync for FixedArray<T, N>
impl<T, const N: usize> Unpin for FixedArray<T, N>where
T: Unpin,
impl<T, const N: usize> !UnwindSafe for FixedArray<T, N>
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