Struct syntex_syntax::util::small_vector::SmallVector
[−]
[src]
pub struct SmallVector<T> { // some fields omitted }
A vector type optimized for cases where the size is almost always 0 or 1
Methods
impl<T> SmallVector<T>
[src]
fn zero() -> SmallVector<T>
fn one(v: T) -> SmallVector<T>
fn many(vs: Vec<T>) -> SmallVector<T>
fn as_slice(&self) -> &[T]
fn pop(&mut self) -> Option<T>
fn push(&mut self, v: T)
fn push_all(&mut self, other: SmallVector<T>)
fn get(&self, idx: usize) -> &T
fn expect_one(self, err: &'static str) -> T
fn len(&self) -> usize
fn is_empty(&self) -> bool
Trait Implementations
impl<T> FromIterator<T> for SmallVector<T>
[src]
fn from_iter<I: IntoIterator<Item=T>>(iter: I) -> SmallVector<T>
Creates a value from an iterator. Read more
impl<T> Extend<T> for SmallVector<T>
[src]
fn extend<I: IntoIterator<Item=T>>(&mut self, iter: I)
Extends a collection with the contents of an iterator. Read more
impl<T> IntoIterator for SmallVector<T>
[src]
type Item = T
The type of the elements being iterated over.
type IntoIter = IntoIter<T>
Which kind of iterator are we turning this into?
fn into_iter(self) -> Self::IntoIter
Creates an iterator from a value. Read more