[][src]Crate slabmap

This crate provides the type SlabMap. SlabMap is HashMap-like collection that automatically determines the key.

Examples

use slabmap::SlabMap;

let mut s = SlabMap::new();
let key_a = s.insert("aaa");
let key_b = s.insert("bbb");

assert_eq!(s[key_a], "aaa");
assert_eq!(s[key_b], "bbb");

for (key, value) in &s {
    println!("{} -> {}", key, value);
}

assert_eq!(s.remove(key_a), Some("aaa"));
assert_eq!(s.remove(key_a), None);

Structs

Drain

A draining iterator for SlabMap.

IntoIter

An owning iterator over the values of a SlabMap.

Iter

An iterator over the entries of a SlabMap.

IterMut

A mutable iterator over the entries of a SlabMap.

Keys

An iterator over the keys of a SlabMap.

SlabMap

A fast HashMap-like collection that automatically determines the key.

Values

An iterator over the values of a SlabMap.

ValuesMut

A mutable iterator over the values of a SlabMap.