Struct syntax::util::small_vector::SmallVector
[−]
[src]
pub struct SmallVector<T> {
// some fields omitted
}Unstable
A vector type optimized for cases where the size is almost always 0 or 1
Methods
impl<T> SmallVector<T>
fn zero() -> SmallVector<T>
Unstable
fn one(v: T) -> SmallVector<T>
Unstable
fn many(vs: Vec<T>) -> SmallVector<T>
Unstable
fn as_slice<'a>(&'a self) -> &'a [T]
Unstable
fn pop(&mut self) -> Option<T>
Unstable
fn push(&mut self, v: T)
Unstable
fn push_all(&mut self, other: SmallVector<T>)
Unstable
fn get<'a>(&'a self, idx: usize) -> &'a T
Unstable
fn expect_one(self, err: &'static str) -> T
Unstable
fn move_iter(self) -> IntoIter<T>
Deprecated since 1.0.0
: use into_iter
Deprecated: use into_iter.
fn into_iter(self) -> IntoIter<T>
Unstable
fn len(&self) -> usize
Unstable
fn is_empty(&self) -> bool
Unstable