convert

Function convert 

Source
pub fn convert<'a>(value: &str, unit: &'a str) -> HashMap<&'a str, String>
Examples found in repository?
examples/main.rs (line 7)
3fn main() {
4    let amt = "1";
5    let amt_unit = "ether";
6    let to_unit = "wei";
7    let map = ether_converter::convert(&amt, &amt_unit);
8    let val = map.get(to_unit).unwrap();
9
10    println!("{} {} = {} {}", amt, amt_unit, val, to_unit);
11    // 1 ether = 1000000000000000000 wei
12}