string_map

Crates.iostring_map
lib.rsstring_map
version0.4.1
sourcesrc
created_at2020-03-03 15:26:40.244315
updated_at2020-03-09 16:59:15.693258
descriptionCreate a record to store any type of value
homepage
repositoryhttps://github.com/GalAster/dict-rs
max_upload_size
id214950
size5,738
SasakiSaki (oovm)

documentation

README

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)));
}
Commit count: 8

cargo fmt