use-geographic-region 0.1.0

Primitive geographic region vocabulary for RustUse
Documentation
  • Coverage
  • 11.54%
    3 out of 26 items documented1 out of 12 items with examples
  • Size
  • Source code size: 10.22 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 688.84 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-geographic-region

Primitive geographic region vocabulary for RustUse.

use-geographic-region provides descriptive names, identifiers, and kinds for geographic regions without storing or validating GIS geometry.

Non-goals

  • GIS polygons
  • official-boundary validation
  • boundary-data fetching
  • spatial indexing

Example

use use_geographic_region::{GeographicRegionId, GeographicRegionKind, GeographicRegionName};

# fn main() -> Result<(), Box<dyn std::error::Error>> {
let name = GeographicRegionName::new("Pacific Northwest")?;
let kind = "cultural".parse::<GeographicRegionKind>()?;
let id = GeographicRegionId::new("pacific-northwest")?;

assert_eq!(name.as_str(), "Pacific Northwest");
assert_eq!(kind, GeographicRegionKind::Cultural);
assert_eq!(id.as_str(), "pacific-northwest");
# Ok(())
# }