pub struct SmallVec<T: Array, S = Vec<<T as Array>::Item>>(/* private fields */);
Implementations§
Trait Implementations§
Source§impl<'a, T: Array + 'a, S: Vector<Item = T::Item> + 'a> AsRef<dyn Vector<Item = <T as Array>::Item> + 'a> for SmallVec<T, S>
impl<'a, T: Array + 'a, S: Vector<Item = T::Item> + 'a> AsRef<dyn Vector<Item = <T as Array>::Item> + 'a> for SmallVec<T, S>
Source§impl<T: Array, S: Debug + Vector<Item = T::Item> + Spilled<ArrayVec<T>>> Debug for SmallVec<T, S>
impl<T: Array, S: Debug + Vector<Item = T::Item> + Spilled<ArrayVec<T>>> Debug for SmallVec<T, S>
Source§impl<T: Array, S: Extend<T::Item>> Extend<<T as Array>::Item> for SmallVec<T, S>
impl<T: Array, S: Extend<T::Item>> Extend<<T as Array>::Item> for SmallVec<T, S>
Source§fn extend<I: IntoIterator<Item = T::Item>>(&mut self, iter: I)
fn extend<I: IntoIterator<Item = T::Item>>(&mut self, iter: I)
Extends a collection with the contents of an iterator. Read more
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one
)Extends a collection with exactly one element.
Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
Source§impl<T: Array, S: Spilled<ArrayVec<T>> + Index<Range<usize>>> Index<Range<usize>> for SmallVec<T, S>
impl<T: Array, S: Spilled<ArrayVec<T>> + Index<Range<usize>>> Index<Range<usize>> for SmallVec<T, S>
Source§impl<T: Array, S: Spilled<ArrayVec<T>> + Index<RangeFrom<usize>>> Index<RangeFrom<usize>> for SmallVec<T, S>
impl<T: Array, S: Spilled<ArrayVec<T>> + Index<RangeFrom<usize>>> Index<RangeFrom<usize>> for SmallVec<T, S>
Source§impl<T: Array, S: Spilled<ArrayVec<T>> + Index<RangeFull>> Index<RangeFull> for SmallVec<T, S>
impl<T: Array, S: Spilled<ArrayVec<T>> + Index<RangeFull>> Index<RangeFull> for SmallVec<T, S>
Source§impl<T: Array, S: Spilled<ArrayVec<T>> + Index<RangeTo<usize>>> Index<RangeTo<usize>> for SmallVec<T, S>
impl<T: Array, S: Spilled<ArrayVec<T>> + Index<RangeTo<usize>>> Index<RangeTo<usize>> for SmallVec<T, S>
Source§impl<T: Array, S: Spilled<ArrayVec<T>> + IndexMut<Range<usize>>> IndexMut<Range<usize>> for SmallVec<T, S>
impl<T: Array, S: Spilled<ArrayVec<T>> + IndexMut<Range<usize>>> IndexMut<Range<usize>> for SmallVec<T, S>
Source§impl<T: Array, S: Spilled<ArrayVec<T>> + IndexMut<RangeFrom<usize>>> IndexMut<RangeFrom<usize>> for SmallVec<T, S>
impl<T: Array, S: Spilled<ArrayVec<T>> + IndexMut<RangeFrom<usize>>> IndexMut<RangeFrom<usize>> for SmallVec<T, S>
Source§impl<T: Array, S: Spilled<ArrayVec<T>> + IndexMut<RangeFull>> IndexMut<RangeFull> for SmallVec<T, S>
impl<T: Array, S: Spilled<ArrayVec<T>> + IndexMut<RangeFull>> IndexMut<RangeFull> for SmallVec<T, S>
Source§impl<T: Array, S: Spilled<ArrayVec<T>> + IndexMut<RangeTo<usize>>> IndexMut<RangeTo<usize>> for SmallVec<T, S>
impl<T: Array, S: Spilled<ArrayVec<T>> + IndexMut<RangeTo<usize>>> IndexMut<RangeTo<usize>> for SmallVec<T, S>
Source§impl<T: Array, S: IntoIterator<Item = <ArrayVec<T> as IntoIterator>::Item>> IntoIterator for SmallVec<T, S>where
ArrayVec<T>: IntoIterator,
impl<T: Array, S: IntoIterator<Item = <ArrayVec<T> as IntoIterator>::Item>> IntoIterator for SmallVec<T, S>where
ArrayVec<T>: IntoIterator,
Source§type Item = <S as IntoIterator>::Item
type Item = <S as IntoIterator>::Item
The type of the elements being iterated over.
Source§type IntoIter = SmallVecIter<<ArrayVec<T> as IntoIterator>::IntoIter, <S as IntoIterator>::IntoIter>
type IntoIter = SmallVecIter<<ArrayVec<T> as IntoIterator>::IntoIter, <S as IntoIterator>::IntoIter>
Which kind of iterator are we turning this into?
Source§impl<T: Array, S: Vector<Item = T::Item> + Spilled<ArrayVec<T>>> Vector for SmallVec<T, S>
impl<T: Array, S: Vector<Item = T::Item> + Spilled<ArrayVec<T>>> Vector for SmallVec<T, S>
type Item = <T as Array>::Item
fn with_capacity(cap: usize) -> Self
fn capacity(&self) -> usize
fn reserve(&mut self, additional: usize)
fn reserve_exact(&mut self, additional: usize)
fn shrink_to_fit(&mut self)
fn into_boxed_slice(self) -> Box<[T::Item]>
unsafe fn set_len(&mut self, len: usize)
fn len(&self) -> usize
fn as_ptr(&self) -> *const T::Item
fn as_mut_ptr(&mut self) -> *mut T::Item
fn new() -> Selfwhere
Self: Sized,
fn truncate(&mut self, len: usize)
fn swap_remove(&mut self, index: usize) -> Self::Item
fn insert(&mut self, index: usize, element: Self::Item)
fn remove(&mut self, index: usize) -> Self::Item
fn retain<F: FnMut(&Self::Item) -> bool>(&mut self, f: F)where
Self: Sized,
fn push(&mut self, value: Self::Item)
fn pop(&mut self) -> Option<Self::Item>
fn clear(&mut self)
fn is_empty(&self) -> bool
fn push_cap(&mut self, value: Self::Item) -> Result<(), Self::Item>
fn insert_cap( &mut self, index: usize, element: Self::Item, ) -> Option<Self::Item>
fn as_slice(&self) -> &[Self::Item]
fn as_mut_slice(&mut self) -> &mut [Self::Item]
unsafe fn uninitialized_resize(&mut self, new_len: usize)
Auto Trait Implementations§
impl<T, S> Freeze for SmallVec<T, S>
impl<T, S> RefUnwindSafe for SmallVec<T, S>
impl<T, S> Send for SmallVec<T, S>
impl<T, S> Sync for SmallVec<T, S>
impl<T, S> Unpin for SmallVec<T, S>
impl<T, S> UnwindSafe for SmallVec<T, S>
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