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

#400 in HTTP server

Download history 284/week @ 2024-08-17 186/week @ 2024-08-24 196/week @ 2024-08-31 216/week @ 2024-09-07 236/week @ 2024-09-14 278/week @ 2024-09-21 155/week @ 2024-09-28 179/week @ 2024-10-05 153/week @ 2024-10-12 196/week @ 2024-10-19 186/week @ 2024-10-26 216/week @ 2024-11-02 123/week @ 2024-11-09 239/week @ 2024-11-16 162/week @ 2024-11-23 402/week @ 2024-11-30

963 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
~782K SLoC