[][src]Module ordnung::compact

This is meant to be API compatible drop in replacement for std Vec<T>, but made compact by cramming capacity and length into a single 64bit word.

use std::mem::size_of;

const WORD: usize = size_of::<usize>();

assert_eq!(size_of::<Vec<u8>>(), WORD * 3);
assert_eq!(size_of::<ordnung::compact::Vec<u8>>(), WORD * 2);

Structs

Vec

A contiguous growable array type, written Vec<T> but pronounced 'vector'.