slab_typesafe

A type-safe wrapper from Rust's "slab" data structure

Prevents using slab with obviously wrong keys:

```rust

[macro_use]

extern crate slab_typesafe;

declareslabtoken!(StringHandle1); declareslabtoken!(StringHandle2);

let mut slab1 : Slab = Slab::new(); let mut slab2 : Slab = Slab::new();

let hello = slab1.insert("hello"); let world = slab2.insert("world");

slab1[world]; // the type Slab<StringHandle1, _> cannot be indexed by StringHandle2 slab2.remove(hello); // expected struct StringHandle2, found struct StringHandle1 ```rust