pub fn neighbors(hash_str: &str) -> Result<Neighbors, GeohashError> {
    Ok(Neighbors {
        sw: neighbor(hash_str, Direction::SW)?,
        s: neighbor(hash_str, Direction::S)?,
        se: neighbor(hash_str, Direction::SE)?,
        w: neighbor(hash_str, Direction::W)?,
        e: neighbor(hash_str, Direction::E)?,
        nw: neighbor(hash_str, Direction::NW)?,
        n: neighbor(hash_str, Direction::N)?,
        ne: neighbor(hash_str, Direction::NE)?,
    })
}
/// Find all neighboring geohashes for the given geohash.
///
/// ### Examples
///
/// ```
/// let geohash_str = "9q60y60rhs";
///
/// let neighbors = geohash::neighbors(geohash_str).expect("Invalid hash string");
///
/// assert_eq!(
///     neighbors,
///     geohash::Neighbors {
///         n: "9q60y60rht".to_owned(),
///         ne: "9q60y60rhv".to_owned(),
///         e: "9q60y60rhu".to_owned(),
///         se: "9q60y60rhg".to_owned(),
///         s: "9q60y60rhe".to_owned(),
///         sw: "9q60y60rh7".to_owned(),
///         w: "9q60y60rhk".to_owned(),
///         nw: "9q60y60rhm".to_owned(),
///     }
/// );
/// ```
Find all neighboring geohashes for the given geohash.
Find all neighboring geohashes for the given geohash .
pub fn neighbors(hash_str: &str) -> Result<Neighbors, GeohashError> {
    Ok(Neighbors {
        sw: neighbor(hash_str, Direction::SW)?,
        s: neighbor(hash_str, Direction::S)?,
        se: neighbor(hash_str, Direction::SE)?,
        w: neighbor(hash_str, Direction::W)?,
        e: neighbor(hash_str, Direction::E)?,
        nw: neighbor(hash_str, Direction::NW)?,
        n: neighbor(hash_str, Direction::N)?,
        ne: neighbor(hash_str, Direction::NE)?,
    })
}
pub fn neighbors ( hash_str : & str ) -> Result < Neighbors , GeohashError > { Ok ( Neighbors { sw : neighbor ( hash_str , Direction :: SW ) ? , s : neighbor ( hash_str , Direction :: S ) ? , se : neighbor ( hash_str , Direction :: SE ) ? , w : neighbor ( hash_str , Direction :: W ) ? , e : neighbor ( hash_str , Direction :: E ) ? , nw : neighbor ( hash_str , Direction :: NW ) ? , n : neighbor ( hash_str , Direction :: N ) ? , ne : neighbor ( hash_str , Direction :: NE ) ? , } ) }
Find all neighboring geohashes for the given geohash.
Find all neighboring geohashes for the given geohash .
hash_str
&str
examples


let neighbors = geohash::neighbors(geohash_str).expect("Invalid hash string").


let neighbors = geohash :: neighbors ( geohash_str ) . expect ( " Invalid hash string " ) .