Polystore

Test Status Crate API

A polymorphic data store: ```rust // It's a HashMap storing polymorphic values: let mut store = HashMap::new();

// k1 is the key 1 tagged with the element type &'static str let k1 = store.insert(1, "A static str"); if let Some(v) = store.getmut(&k1) { *v = "another str"; } asserteq!(store.get_tagged(&k1), Some(&"another str"));

// untagged keys work too (relying on type inference, here String): store.insert(2, "A String".tostring()); asserteq!(store.get(&2), Some(&"A String".to_string()));

assert!(store.containskey(&k1)); assert!(store.containskey(&1)); assert!(!store.contains_key(&3)); ```

Crate Features

Optional crate features:

License

Polystore is distributed under the terms of both the MIT license and the Apache License (Version 2.0).

See LICENSE-APACHE and LICENSE-MIT, and COPYRIGHT for details.