pluscodes

Crates.iopluscodes
lib.rspluscodes
version0.5.0
sourcesrc
created_at2022-11-12 23:46:22.842901
updated_at2022-11-21 22:30:58.841683
descriptionAn implementation of plus codes, to be used as CLI tool or crate
homepage
repositoryhttps://github.com/janne/pluscodes-rs
max_upload_size
id713875
size18,612
Jan Andersson (janne)

documentation

https://docs.rs/pluscodes

README

Plus codes

Plus codes is an implementation of plus codes in Rust. It can be used either as a command line tool or as a crate.

As command line tool

  • Install and setup Rust and Cargo
  • cargo install pluscodes

Try it out with:

pluscodes help
pluscodes encode 59.335938,18.077813
pluscodes encode 59.335938,18.077813 --length 6
pluscodes decode 9FFW83PH+94

As a Rust crate

cargo add pluscodes

let coord = pluscodes::Coord {
    latitude: 59.335938,
    longitude: 18.077813,
};
pluscodes::encode(&coord, 10) // => "9FFW83PH+94"
pluscodes::encode(&coord, 6) // => "9FFW8300+"
pluscodes::decode("9FFW83PH+94") // => pluscodes::Coord {...}

Commit count: 27

cargo fmt