turbocow 0.3.0-beta.2

Compact, clone-on-write vectors, strings, maps and sets with inline + referenced storage — a superset of ecow.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! Inline-spillable vector for arbitrary `T`s.
//!
//! `SmallVec<'a, T, N>` stores up to `N` elements inline on the stack. When
//! the capacity is exceeded it spills to a heap-allocated buffer with a
//! single-word header storing the capacity. It can also hold a zero-copy
//! borrow of an existing `&'a [T]` (Referenced variant).
//!
//! # Layout
//! Uses a `repr(C)` struct with a `tagged_len` (2 tag bits + 62-bit length)
//! and a union overlapping the three variants. Total size:
//! `8 + max(N * size_of::<T>(), 8)` bytes.

mod impls;
mod types;

pub use impls::{Drain, IntoIter};
pub use types::SmallVec;