polystore 0.1.0

Polymorphic data store
Documentation
  • Coverage
  • 94.44%
    34 out of 36 items documented0 out of 32 items with examples
  • Size
  • Source code size: 24.52 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 3.53 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 11s Average build duration of successful builds.
  • all releases: 11s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • kas-gui/polystore
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • dhardy

Polystore

Test Status Crate API

A polymorphic data store:

// It's a HashMap<K = i32> 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.get_mut(&k1) {
    *v = "another str";
}
assert_eq!(store.get_tagged(&k1), Some(&"another str"));

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

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

Crate Features

Optional crate features:

  • fxhash: add FxHashMap using the rustc-hash crate

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.