Skip to content

Temdog007/array-map

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

array-map

A fixed-sized, stack-allocated implementation of a hash map using arrays for Rust.

Examples

#[macro_use]
use array_map::*;

// Creates a module named Map with the ArrayMap
// Keys are bytes
// Values are signed integers
// Max size is 64 (4 * 4 * 4)
make_map!(Map, u8, i32, 4, 4, 4);
type TestMap = Map::ArrayMap;

fn main() {
  let mut t: TestMap = Default::default();

  for i in 0..64 {
      t.insert(i, i as i32 * 32);
  }
  
  for (k,v) in t.iter() { 
    println!("{} => {}", k, v);
  }
}

About

A fixed-sized, stack-allocated implementation of a hash map using arrays for Rust.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages