Struct rustc_data_structures::small_vec::SmallVec [−][src]
pub struct SmallVec<A: Array>(_);
Methods
impl<A: Array> SmallVec<A>
[src]
impl<A: Array> SmallVec<A>
pub fn new() -> Self
[src]
pub fn new() -> Self
pub fn is_array(&self) -> bool
[src]
pub fn is_array(&self) -> bool
pub fn with_capacity(cap: usize) -> Self
[src]
pub fn with_capacity(cap: usize) -> Self
pub fn one(el: A::Element) -> Self
[src]
pub fn one(el: A::Element) -> Self
pub fn many<I: IntoIterator<Item = A::Element>>(els: I) -> Self
[src]
pub fn many<I: IntoIterator<Item = A::Element>>(els: I) -> Self
pub fn expect_one(self, err: &'static str) -> A::Element
[src]
pub fn expect_one(self, err: &'static str) -> A::Element
pub fn push(&mut self, el: A::Element)
[src]
pub fn push(&mut self, el: A::Element)
Will reallocate onto the heap if needed.
pub fn reserve(&mut self, n: usize)
[src]
pub fn reserve(&mut self, n: usize)
pub unsafe fn set_len(&mut self, len: usize)
[src]
pub unsafe fn set_len(&mut self, len: usize)
pub fn insert(&mut self, index: usize, element: A::Element)
[src]
pub fn insert(&mut self, index: usize, element: A::Element)
pub fn truncate(&mut self, len: usize)
[src]
pub fn truncate(&mut self, len: usize)
Methods from Deref<Target = AccumulateVec<A>>
pub fn is_array(&self) -> bool
[src]
pub fn is_array(&self) -> bool
pub fn len(&self) -> usize
[src]
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
[src]
pub fn is_empty(&self) -> bool
pub fn pop(&mut self) -> Option<A::Element>
[src]
pub fn pop(&mut self) -> Option<A::Element>
ⓘImportant traits for Drain<'a, A>pub fn drain<R>(&mut self, range: R) -> Drain<A> where
R: RangeBounds<usize>,
[src]
ⓘImportant traits for Drain<'a, A>
pub fn drain<R>(&mut self, range: R) -> Drain<A> where
R: RangeBounds<usize>,
Trait Implementations
impl<A> Clone for SmallVec<A> where
A: Array,
A::Element: Clone,
[src]
impl<A> Clone for SmallVec<A> where
A: Array,
A::Element: Clone,
fn clone(&self) -> Self
[src]
fn clone(&self) -> Self
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl<A> Debug for SmallVec<A> where
A: Array + Debug,
A::Element: Debug,
[src]
impl<A> Debug for SmallVec<A> where
A: Array + Debug,
A::Element: Debug,
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<A: Array> Deref for SmallVec<A>
[src]
impl<A: Array> Deref for SmallVec<A>
type Target = AccumulateVec<A>
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target
[src]
fn deref(&self) -> &Self::Target
Dereferences the value.
impl<A: Array> DerefMut for SmallVec<A>
[src]
impl<A: Array> DerefMut for SmallVec<A>
fn deref_mut(&mut self) -> &mut AccumulateVec<A>
[src]
fn deref_mut(&mut self) -> &mut AccumulateVec<A>
Mutably dereferences the value.
impl<A: Array> FromIterator<A::Element> for SmallVec<A>
[src]
impl<A: Array> FromIterator<A::Element> for SmallVec<A>
fn from_iter<I>(iter: I) -> Self where
I: IntoIterator<Item = A::Element>,
[src]
fn from_iter<I>(iter: I) -> Self where
I: IntoIterator<Item = A::Element>,
Creates a value from an iterator. Read more
impl<A: Array> Extend<A::Element> for SmallVec<A>
[src]
impl<A: Array> Extend<A::Element> for SmallVec<A>
fn extend<I: IntoIterator<Item = A::Element>>(&mut self, iter: I)
[src]
fn extend<I: IntoIterator<Item = A::Element>>(&mut self, iter: I)
Extends a collection with the contents of an iterator. Read more
impl<A: Array> IntoIterator for SmallVec<A>
[src]
impl<A: Array> IntoIterator for SmallVec<A>
type Item = A::Element
The type of the elements being iterated over.
type IntoIter = IntoIter<A>
Which kind of iterator are we turning this into?
fn into_iter(self) -> Self::IntoIter
[src]
fn into_iter(self) -> Self::IntoIter
Creates an iterator from a value. Read more
impl<A: Array> Default for SmallVec<A>
[src]
impl<A: Array> Default for SmallVec<A>
impl<A> Encodable for SmallVec<A> where
A: Array,
A::Element: Encodable,
[src]
impl<A> Encodable for SmallVec<A> where
A: Array,
A::Element: Encodable,
impl<A> Decodable for SmallVec<A> where
A: Array,
A::Element: Decodable,
[src]
impl<A> Decodable for SmallVec<A> where
A: Array,
A::Element: Decodable,