Module sqlib::map [] [src]

map provides functions around StringMap (HashMap).

Example

use sqlib::map::{to_map, update_from_map};

let map = to_map("key1=2");
let mut integer = 1i32;

update_from_map(&map, "key1", &mut integer);

assert_eq!(integer, 2);

Functions

to_map

creates a new StringMap from a &str.

update_from_map

This function gets the value to the key from the map, then parses it and mutates the given pointer.

Type Definitions

StringMap

A small newtype for a HashMap of Strings.