string_map 0.4.1

Create a record to store any type of value
Documentation
  • Coverage
  • 0%
    0 out of 2 items documented0 out of 0 items with examples
  • Size
  • Source code size: 5.36 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.44 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • oovm/dict-rs
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • oovm

StringMap

Create a record to store any type of value

Basic Usage

extern crate string_map;

use string_map::StringMap;

#[test]
fn main() {
    let mut dict = StringMap::new();
    dict.insert("number", 0);
    dict.insert("string", "str");
    dict.insert("boolean", true);

    debug_assert_eq!(dict.get("number"), Some(&0));
    debug_assert_eq!(dict.get_mut("string"), Some(&mut "str"));
    debug_assert_eq!(dict.get_key_value("boolean"), Some(("boolean", &true)));
}