Struct stack::SmallVec
[−]
[src]
pub struct SmallVec<T: Array, S = Vec<<T as Array>::Item>>(_);
Methods
impl<T: Array, S: Vector + Spilled<ArrayVec<T>>> SmallVec<T, S>
[src]
fn spill(&mut self)
[src]
fn is_spilled(&self) -> bool
[src]
impl<T: Array, S> SmallVec<T, S>
[src]
fn into_inner(self) -> Coalesce2<ArrayVec<T>, S>
[src]
Trait Implementations
impl<T: Array, S: Spilled<ArrayVec<T>> + Index<usize>> Index<usize> for SmallVec<T, S> where
ArrayVec<T>: Index<usize, Output = <S as Index<usize>>::Output>,
[src]
ArrayVec<T>: Index<usize, Output = <S as Index<usize>>::Output>,
type Output = <S as Index<usize>>::Output
The returned type after indexing.
fn index(&self, index: usize) -> &Self::Output
[src]
Performs the indexing (container[index]
) operation.
impl<T: Array, S: Spilled<ArrayVec<T>> + IndexMut<usize>> IndexMut<usize> for SmallVec<T, S> where
ArrayVec<T>: IndexMut<usize, Output = <S as Index<usize>>::Output>,
[src]
ArrayVec<T>: IndexMut<usize, Output = <S as Index<usize>>::Output>,
fn index_mut(&mut self, index: usize) -> &mut Self::Output
[src]
Performs the mutable indexing (container[index]
) operation.
impl<T: Array, S: Spilled<ArrayVec<T>> + Index<Range<usize>>> Index<Range<usize>> for SmallVec<T, S> where
ArrayVec<T>: Index<Range<usize>, Output = <S as Index<Range<usize>>>::Output>,
[src]
ArrayVec<T>: Index<Range<usize>, Output = <S as Index<Range<usize>>>::Output>,
type Output = <S as Index<Range<usize>>>::Output
The returned type after indexing.
fn index(&self, index: Range<usize>) -> &Self::Output
[src]
Performs the indexing (container[index]
) operation.
impl<T: Array, S: Spilled<ArrayVec<T>> + IndexMut<Range<usize>>> IndexMut<Range<usize>> for SmallVec<T, S> where
ArrayVec<T>: IndexMut<Range<usize>, Output = <S as Index<Range<usize>>>::Output>,
[src]
ArrayVec<T>: IndexMut<Range<usize>, Output = <S as Index<Range<usize>>>::Output>,
fn index_mut(&mut self, index: Range<usize>) -> &mut Self::Output
[src]
Performs the mutable indexing (container[index]
) operation.
impl<T: Array, S: Spilled<ArrayVec<T>> + Index<RangeFrom<usize>>> Index<RangeFrom<usize>> for SmallVec<T, S> where
ArrayVec<T>: Index<RangeFrom<usize>, Output = <S as Index<RangeFrom<usize>>>::Output>,
[src]
ArrayVec<T>: Index<RangeFrom<usize>, Output = <S as Index<RangeFrom<usize>>>::Output>,
type Output = <S as Index<RangeFrom<usize>>>::Output
The returned type after indexing.
fn index(&self, index: RangeFrom<usize>) -> &Self::Output
[src]
Performs the indexing (container[index]
) operation.
impl<T: Array, S: Spilled<ArrayVec<T>> + IndexMut<RangeFrom<usize>>> IndexMut<RangeFrom<usize>> for SmallVec<T, S> where
ArrayVec<T>: IndexMut<RangeFrom<usize>, Output = <S as Index<RangeFrom<usize>>>::Output>,
[src]
ArrayVec<T>: IndexMut<RangeFrom<usize>, Output = <S as Index<RangeFrom<usize>>>::Output>,
fn index_mut(&mut self, index: RangeFrom<usize>) -> &mut Self::Output
[src]
Performs the mutable indexing (container[index]
) operation.
impl<T: Array, S: Spilled<ArrayVec<T>> + Index<RangeTo<usize>>> Index<RangeTo<usize>> for SmallVec<T, S> where
ArrayVec<T>: Index<RangeTo<usize>, Output = <S as Index<RangeTo<usize>>>::Output>,
[src]
ArrayVec<T>: Index<RangeTo<usize>, Output = <S as Index<RangeTo<usize>>>::Output>,
type Output = <S as Index<RangeTo<usize>>>::Output
The returned type after indexing.
fn index(&self, index: RangeTo<usize>) -> &Self::Output
[src]
Performs the indexing (container[index]
) operation.
impl<T: Array, S: Spilled<ArrayVec<T>> + IndexMut<RangeTo<usize>>> IndexMut<RangeTo<usize>> for SmallVec<T, S> where
ArrayVec<T>: IndexMut<RangeTo<usize>, Output = <S as Index<RangeTo<usize>>>::Output>,
[src]
ArrayVec<T>: IndexMut<RangeTo<usize>, Output = <S as Index<RangeTo<usize>>>::Output>,
fn index_mut(&mut self, index: RangeTo<usize>) -> &mut Self::Output
[src]
Performs the mutable indexing (container[index]
) operation.
impl<T: Array, S: Spilled<ArrayVec<T>> + Index<RangeFull>> Index<RangeFull> for SmallVec<T, S> where
ArrayVec<T>: Index<RangeFull, Output = <S as Index<RangeFull>>::Output>,
[src]
ArrayVec<T>: Index<RangeFull, Output = <S as Index<RangeFull>>::Output>,
type Output = <S as Index<RangeFull>>::Output
The returned type after indexing.
fn index(&self, index: RangeFull) -> &Self::Output
[src]
Performs the indexing (container[index]
) operation.
impl<T: Array, S: Spilled<ArrayVec<T>> + IndexMut<RangeFull>> IndexMut<RangeFull> for SmallVec<T, S> where
ArrayVec<T>: IndexMut<RangeFull, Output = <S as Index<RangeFull>>::Output>,
[src]
ArrayVec<T>: IndexMut<RangeFull, Output = <S as Index<RangeFull>>::Output>,
fn index_mut(&mut self, index: RangeFull) -> &mut Self::Output
[src]
Performs the mutable indexing (container[index]
) operation.
impl<T: Array, S: Clone> Clone for SmallVec<T, S> where
ArrayVec<T>: Clone,
[src]
ArrayVec<T>: Clone,
fn clone(&self) -> Self
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<T: Array, S> From<ArrayVec<T>> for SmallVec<T, S>
[src]
impl<T: Array, S: Vector<Item = T::Item> + Spilled<ArrayVec<T>>> Vector for SmallVec<T, S>
[src]
type Item = T::Item
fn with_capacity(cap: usize) -> Self
[src]
fn capacity(&self) -> usize
[src]
fn reserve(&mut self, additional: usize)
[src]
fn reserve_exact(&mut self, additional: usize)
[src]
fn shrink_to_fit(&mut self)
[src]
fn into_boxed_slice(self) -> Box<[T::Item]>
[src]
unsafe fn set_len(&mut self, len: usize)
[src]
fn len(&self) -> usize
[src]
fn as_ptr(&self) -> *const T::Item
[src]
fn as_mut_ptr(&mut self) -> *mut T::Item
[src]
fn new() -> Self where
Self: Sized,
[src]
Self: Sized,
fn truncate(&mut self, len: usize)
[src]
fn swap_remove(&mut self, index: usize) -> Self::Item
[src]
fn insert(&mut self, index: usize, element: Self::Item)
[src]
fn remove(&mut self, index: usize) -> Self::Item
[src]
fn retain<F: FnMut(&Self::Item) -> bool>(&mut self, f: F) where
Self: Sized,
[src]
Self: Sized,
fn push(&mut self, value: Self::Item)
[src]
fn pop(&mut self) -> Option<Self::Item>
[src]
fn clear(&mut self)
[src]
fn is_empty(&self) -> bool
[src]
fn push_cap(&mut self, value: Self::Item) -> Result<(), Self::Item>
[src]
fn insert_cap(
&mut self,
index: usize,
element: Self::Item
) -> Option<Self::Item>
[src]
&mut self,
index: usize,
element: Self::Item
) -> Option<Self::Item>
fn as_slice(&self) -> &[Self::Item]
[src]
fn as_mut_slice(&mut self) -> &mut [Self::Item]
[src]
unsafe fn uninitialized_resize(&mut self, new_len: usize)
[src]
impl<T: Array, S: Extend<T::Item>> Extend<T::Item> for SmallVec<T, S> where
SmallVec<T, S>: Vector,
[src]
SmallVec<T, S>: Vector,
fn extend<I: IntoIterator<Item = T::Item>>(&mut self, iter: I)
[src]
Extends a collection with the contents of an iterator. Read more
impl<T: Array, S: Extend<T::Item>> FromIterator<T::Item> for SmallVec<T, S> where
SmallVec<T, S>: Vector,
[src]
SmallVec<T, S>: Vector,
fn from_iter<I: IntoIterator<Item = T::Item>>(iter: I) -> Self
[src]
Creates a value from an iterator. Read more
impl<T: Array, S: IntoIterator<Item = <ArrayVec<T> as IntoIterator>::Item>> IntoIterator for SmallVec<T, S> where
ArrayVec<T>: IntoIterator,
[src]
ArrayVec<T>: IntoIterator,
type Item = <S as IntoIterator>::Item
The type of the elements being iterated over.
type IntoIter = SmallVecIter<<ArrayVec<T> as IntoIterator>::IntoIter, <S as IntoIterator>::IntoIter>
Which kind of iterator are we turning this into?
fn into_iter(self) -> Self::IntoIter
[src]
Creates an iterator from a value. Read more
impl<T: Array, S: Deref> Deref for SmallVec<T, S> where
ArrayVec<T>: Deref<Target = S::Target>,
[src]
ArrayVec<T>: Deref<Target = S::Target>,
type Target = S::Target
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target
[src]
Dereferences the value.
impl<T: Array, S: DerefMut> DerefMut for SmallVec<T, S> where
ArrayVec<T>: DerefMut + Deref<Target = S::Target>,
[src]
ArrayVec<T>: DerefMut + Deref<Target = S::Target>,
impl<T: Array, S> Default for SmallVec<T, S>
[src]
impl<T: Array, S: Hash> Hash for SmallVec<T, S> where
ArrayVec<T>: Hash,
[src]
ArrayVec<T>: Hash,
fn hash<H: Hasher>(&self, h: &mut H)
[src]
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl<T: Array, S: Debug + Vector<Item = T::Item> + Spilled<ArrayVec<T>>> Debug for SmallVec<T, S> where
ArrayVec<T>: Debug,
[src]
ArrayVec<T>: Debug,
impl<'a, T: Array + 'a, S: Vector<Item = T::Item> + 'a> AsRef<Vector<Item = T::Item> + 'a> for SmallVec<T, S> where
T::Item: 'a,
T::Index: 'a,
[src]
T::Item: 'a,
T::Index: 'a,