hvec

Crates.io Docs.rs

In memory of Anna Harren, who coined the term turbofish - which you'll see a lot of if you use this crate.

The main purpose of this crate is the HarrenVec type - a Vec-like data structure that can store items of different types and sizes from each other.

Usage

```rust use hvec::hvec;

// Make a list that can contain any type let list = hvec![ 1usize, 2usize, 999usize, "Wow, big number!".tostring(), 3_usize, ];

// Make an iterator (unfortunately can't use for loops) let mut iter = list.into_iter();

// Use next with the turbofish to step through elements of different types let mut total = 0; while let Some(number) = iter.next::() { if number > 100 { let comment = iter.next::().unwrap(); println!("{}", comment); // Wow, big number! } total += number; } assert_eq!(total, 1005); ```