16 releases

0.6.5 Dec 16, 2024
0.6.4 Sep 20, 2024
0.6.3 Jun 15, 2024
0.6.2 Mar 23, 2024
0.5.1 Sep 28, 2023

#355 in HTTP server

Download history 247/week @ 2024-09-22 154/week @ 2024-09-29 185/week @ 2024-10-06 161/week @ 2024-10-13 185/week @ 2024-10-20 195/week @ 2024-10-27 205/week @ 2024-11-03 142/week @ 2024-11-10 226/week @ 2024-11-17 165/week @ 2024-11-24 428/week @ 2024-12-01 186/week @ 2024-12-08 305/week @ 2024-12-15 187/week @ 2024-12-22 157/week @ 2024-12-29 226/week @ 2025-01-05

881 downloads per month
Used in qsv

MIT license

74KB
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–49MB
~753K SLoC