use this_algorithm::Address; use wasm_bindgen::prelude::*; #[wasm_bindgen] extern "C" { // fn alert(s: &str); #[wasm_bindgen(js_namespace = console, js_name = log)] fn log_str(s: &str); } #[wasm_bindgen] pub fn address_lat_lon(lat: f64, lon: f64) -> Result { Address::from_lat_lon(lat, lon) .map(|a| a.to_string()) .map_err(|e| e.to_string()) } // #[wasm_bindgen] // pub fn to_lat_lon(address: &str) -> Result>< { // }