15 releases

0.6.4 Sep 20, 2024
0.6.3 Jun 15, 2024
0.6.2 Mar 23, 2024
0.5.3 Dec 27, 2023
0.5.1 Sep 28, 2023

#385 in HTTP server

Download history 208/week @ 2024-07-29 218/week @ 2024-08-05 233/week @ 2024-08-12 303/week @ 2024-08-19 146/week @ 2024-08-26 203/week @ 2024-09-02 203/week @ 2024-09-09 283/week @ 2024-09-16 248/week @ 2024-09-23 137/week @ 2024-09-30 199/week @ 2024-10-07 153/week @ 2024-10-14 191/week @ 2024-10-21 191/week @ 2024-10-28 187/week @ 2024-11-04 127/week @ 2024-11-11

725 downloads per month
Used in qsv

MIT license

71KB
1.5K SLoC

geosuggest-utils

HTTP service

Examples

Usage example

use tokio;
use anyhow::Result;

use geosuggest_utils::{IndexUpdater, IndexUpdaterSettings};

#[tokio::main]
async fn main() -> Result<()> {
    println!("Build index...");
    let updater = IndexUpdater::new(IndexUpdaterSettings {
        names: None, // no multilang support
        ..Default::default()
    })?;

    let engine = updater.build().await?;

    println!(
        "Suggest result: {:#?}",
        engine.suggest::<&str>("Beverley", 1, None, Some(&["us"]))
    );
    println!(
        "Reverse result: {:#?}",
        engine.reverse::<&str>((11.138298, 57.510973), 1, None, None)
    );

    Ok(())
}

Dependencies

~18–50MB
~781K SLoC