use-place 0.1.0

Primitive place vocabulary for RustUse
Documentation
  • Coverage
  • 10.71%
    3 out of 28 items documented1 out of 12 items with examples
  • Size
  • Source code size: 9.49 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 670.34 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 3s Average build duration of successful builds.
  • all releases: 3s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • RustUse/use-geography
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • CloudBranch

use-place

Primitive place vocabulary for RustUse.

use-place provides small descriptive primitives for place names, place kinds, and stable place identifiers.

Non-goals

  • geocoding
  • reverse geocoding
  • gazetteer data
  • political-boundary validation

Example

use use_place::{PlaceId, PlaceKind, PlaceName};

# fn main() -> Result<(), Box<dyn std::error::Error>> {
let name = PlaceName::new("Golden Gate Bridge")?;
let kind = "landmark".parse::<PlaceKind>()?;
let id = PlaceId::new("golden-gate-bridge")?;

assert_eq!(name.as_str(), "Golden Gate Bridge");
assert_eq!(kind, PlaceKind::Landmark);
assert_eq!(id.as_str(), "golden-gate-bridge");
# Ok(())
# }