use-geo 0.0.1

Geographic presence and discovery targeting primitives for RustUse
Documentation
  • Coverage
  • 90.91%
    30 out of 33 items documented1 out of 21 items with examples
  • Size
  • Source code size: 11.23 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 667.76 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-presence
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • CloudBranch

use-geo

Geographic presence and discovery targeting primitives for RustUse.

Example

use use_geo::{GeoPoint, GeoRegionCode, GeoTarget, LocationRadius, ServiceArea};

let center = GeoPoint::new(40.7128, -74.0060).unwrap();
let radius = LocationRadius::from_kilometers(25.0).unwrap();
let region = GeoRegionCode::new("us-ny").unwrap();
let area = ServiceArea::new("New York metro").unwrap().with_region(region);
let target = GeoTarget::Radius { center, radius };

assert!(matches!(target, GeoTarget::Radius { .. }));
assert_eq!(area.label(), "New York metro");

Scope

  • GeoPoint, region codes, service-area labels, location radius values, and target descriptors.
  • Presence and discovery labels for external surfaces.

Non-goals

  • GIS, projections, geocoding, routing, or geometry math.
  • Replacing use-geography or use-geometry.

License

Licensed under either Apache-2.0 or MIT, at your option.