[−][src]Function geohash_16::neighbors
pub fn neighbors(hash_str: &str) -> Result<Neighbors, Error>
Find all neighboring geohashes for the given geohash.
Examples
let geohash_str = "4d8c0f1817"; let neighbors = geohash::neighbors(geohash_str).expect("Invalid hash string"); assert_eq!( neighbors, geohash::Neighbors { n: "4d8c0f1842".to_owned(), ne: "4d8c0f1848".to_owned(), e: "4d8c0f181d".to_owned(), se: "4d8c0f181c".to_owned(), s: "4d8c0f1816".to_owned(), sw: "4d8c0f1814".to_owned(), w: "4d8c0f1815".to_owned(), nw: "4d8c0f1840".to_owned(), } );