Geographic types for locations, coordinates, addresses, and service areas
| Tier | domain |
| Role | unclassified (baselined) |
| Path | crates/domain/geo |
| Edition | 2021 |
| Targets | domain_geo |
| Public items | 93 across 3 modules |
| Tests | 55 |
What it is for
# domain-geo
Geographic types for locations, coordinates, addresses, and service areas.
Core Features
- Coordinates: Latitude/longitude with distance calculations
- Addresses: Structured postal addresses with formatting
- Places: Named locations combining coordinates and addresses
- Service Areas: Polygon boundaries for geographic coverage
Example
use domain_geo::{Coordinate, units};
// Create coordinates
let nyc = Coordinate::new(40.7128, -74.0060).unwrap();
let la = Coordinate::new(34.0522, -118.2437).unwrap();
// Calculate distance
let distance_m = nyc.distance_to(&la);
let distance_km = units::meters_to_kilometers(distance_m);
assert!(distance_km > 3900.0 && distance_km < 4000.0);
Capabilities
crate root
# domain-geo
| Item |
|---|
pub const EARTH_RADIUS_METERS: f64 |
Address
# domain-geo
| Item |
|---|
pub struct Address |
Address :: fn builder() -> AddressBuilder |
Address :: fn format_single_line(& self) -> String |
Address :: fn format_multiline(& self) -> String |
AddressBuilder
# domain-geo
| Item |
|---|
pub struct AddressBuilder |
AddressBuilder :: fn new() -> Self |
AddressBuilder :: fn street1(mut self, street1 : impl Into <String>) -> Self |
AddressBuilder :: fn street2(mut self, street2 : impl Into <String>) -> Self |
AddressBuilder :: fn city(mut self, city : impl Into <String>) -> Self |
AddressBuilder :: fn state(mut self, state : impl Into <String>) -> Self |
AddressBuilder :: fn postal_code(mut self, postal_code : impl Into <String>) -> Self |
AddressBuilder :: fn country(mut self, country : impl Into <String>) -> Self |
AddressBuilder :: fn build(self) -> Result <Address, GeoError> |
BoundingBox
# domain-geo
| Item |
|---|
pub struct BoundingBox |
BoundingBox :: fn new(min : Coordinate, max : Coordinate) -> Self |
BoundingBox :: fn from_coordinates(coords : & Coordinate) -> Option <Self> |
BoundingBox :: fn contains(& self, point : & Coordinate) -> bool |
BoundingBox :: fn intersects(& self, other : & BoundingBox) -> bool |
BoundingBox :: fn expand(& self, point : & Coordinate) -> Self |
BoundingBox :: fn center(& self) -> Coordinate |
BoundingBox :: fn width(& self) -> f64 |
BoundingBox :: fn height(& self) -> f64 |
Coordinate
# domain-geo
| Item |
|---|
pub struct Coordinate |
Coordinate :: fn new(latitude : f64, longitude : f64) -> Result <Self, GeoError> |
Coordinate :: fn latitude(& self) -> f64 |
Coordinate :: fn longitude(& self) -> f64 |
Coordinate :: fn distance_to(& self, other : & Self) -> f64 |
Coordinate :: fn bearing_to(& self, other : & Self) -> f64 |
Coordinate :: fn midpoint(& self, other : & Self) -> Self |
Coordinate :: fn destination(& self, bearing : f64, distance : f64) -> Self |
Coordinate :: fn is_within(& self, other : & Self, distance_meters : f64) -> bool |
Direction
# domain-geo
| Item |
|---|
pub enum Direction |
Direction :: fn from_bearing(bearing : f64) -> Self |
Direction :: fn bearing(& self) -> f64 |
Direction :: fn abbreviation(& self) -> & 'static str |
GeoError
# domain-geo
| Item |
|---|
pub enum GeoError |
Place
# domain-geo
| Item |
|---|
pub struct Place |
Place :: fn builder() -> PlaceBuilder |
Place :: fn has_coordinates(& self) -> bool |
Place :: fn has_address(& self) -> bool |
Place :: fn distance_to(& self, other : & Place) -> Option <f64> |
Place :: fn id(& self) -> Uuid |
Place :: fn created_at(& self) -> DateTime <Utc> |
Place :: fn updated_at(& self) -> DateTime <Utc> |
Place :: fn deleted_at(& self) -> Option <DateTime <Utc>> |
PlaceBuilder
# domain-geo
| Item |
|---|
pub struct PlaceBuilder |
PlaceBuilder :: fn new() -> Self |
PlaceBuilder :: fn name(mut self, name : impl Into <String>) -> Self |
PlaceBuilder :: fn coordinate(mut self, coordinate : Coordinate) -> Self |
PlaceBuilder :: fn address(mut self, address : Address) -> Self |
PlaceBuilder :: fn place_type(mut self, place_type : PlaceType) -> Self |
PlaceBuilder :: fn timezone(mut self, timezone : impl Into <String>) -> Self |
PlaceBuilder :: fn build(self) -> Result <Place, GeoError> |
PlaceType
# domain-geo
| Item |
|---|
pub enum PlaceType |
ServiceArea
# domain-geo
| Item |
|---|
pub struct ServiceArea |
ServiceArea :: fn builder() -> ServiceAreaBuilder |
ServiceArea :: fn contains(& self, point : & Coordinate) -> bool |
ServiceArea :: fn bounding_box(& self) -> Option <BoundingBox> |
ServiceArea :: fn centroid(& self) -> Option <Coordinate> |
ServiceArea :: fn area_estimate(& self) -> f64 |
ServiceArea :: fn vertex_count(& self) -> usize |
ServiceArea :: fn id(& self) -> Uuid |
ServiceArea :: fn created_at(& self) -> DateTime <Utc> |
ServiceArea :: fn updated_at(& self) -> DateTime <Utc> |
ServiceArea :: fn deleted_at(& self) -> Option <DateTime <Utc>> |
ServiceAreaBuilder
# domain-geo
| Item |
|---|
pub struct ServiceAreaBuilder |
ServiceAreaBuilder :: fn new() -> Self |
ServiceAreaBuilder :: fn name(mut self, name : impl Into <String>) -> Self |
ServiceAreaBuilder :: fn add_vertex(mut self, coord : Coordinate) -> Self |
ServiceAreaBuilder :: fn boundary(mut self, boundary : Vec <Coordinate>) -> Self |
ServiceAreaBuilder :: fn description(mut self, description : impl Into <String>) -> Self |
ServiceAreaBuilder :: fn is_active(mut self, is_active : bool) -> Self |
ServiceAreaBuilder :: fn build(self) -> Result <ServiceArea, GeoError> |
address (other)
Structs + a transaction-scoped repo over geo_addresses/geo_places
| Item |
|---|
async fn insert_address_tx(tx : & mut Transaction <'_, Postgres>, street1 : & str, street2 : Option <& str>, city : & str, state : Option <& str>, postal_code : Option <& str>, country : & str,) -> Result <GeoAddress, GeoRepoError> |
async fn update_address_tx(tx : & mut Transaction <'_, Postgres>, id : Uuid, street1 : & str, street2 : Option <& str>, city : & str, state : Option <& str>, postal_code : Option <& str>, country : & str,) -> Result <Option <GeoAddress>, GeoRepoError> |
async fn insert_place_tx(tx : & mut Transaction <'_, Postgres>, name : & str, address_id : Uuid,) -> Result <GeoPlace, GeoRepoError> |
GeoAddress
Structs + a transaction-scoped repo over geo_addresses/geo_places
| Item |
|---|
pub struct GeoAddress |
GeoPlace
Structs + a transaction-scoped repo over geo_addresses/geo_places
| Item |
|---|
pub struct GeoPlace |
GeoRepoError
Structs + a transaction-scoped repo over geo_addresses/geo_places
| Item |
|---|
pub enum GeoRepoError |
GeoIpError
Geo-IP resolution — turning an IP address into an approximate
| Item |
|---|
pub enum GeoIpError |
GeoIpRecord
Geo-IP resolution — turning an IP address into an approximate
| Item |
|---|
pub struct GeoIpRecord |
GeoIpRecord :: fn is_empty(& self) -> bool |
GeoIpResolver
Geo-IP resolution — turning an IP address into an approximate
| Item |
|---|
pub trait GeoIpResolver |
MaxMindGeoIpResolver
Geo-IP resolution — turning an IP address into an approximate
| Item |
|---|
pub struct MaxMindGeoIpResolver |
MaxMindGeoIpResolver :: fn open <P : AsRef <Path>>(path : P) -> Result <Self, GeoIpError> |
MaxMindGeoIpResolver :: fn lookup(& self, ip : IpAddr) -> Option <GeoIpRecord> |
units (other)
_No module-level documentation is present in the source._
| Item |
|---|
fn meters_to_kilometers(m : f64) -> f64 |
fn meters_to_miles(m : f64) -> f64 |
fn meters_to_feet(m : f64) -> f64 |
fn kilometers_to_meters(km : f64) -> f64 |
fn miles_to_meters(mi : f64) -> f64 |
fn feet_to_meters(ft : f64) -> f64 |
How to use it
From this crate's own rustdoc:
use domain_geo::{Coordinate, units};
// Create coordinates
let nyc = Coordinate::new(40.7128, -74.0060).unwrap();
let la = Coordinate::new(34.0522, -118.2437).unwrap();
// Calculate distance
let distance_m = nyc.distance_to(&la);
let distance_km = units::meters_to_kilometers(distance_m);
assert!(distance_km > 3900.0 && distance_km < 4000.0);
Module structure
domain_geo
addressgeoipunits
flowchart TD n_domain_geo["domain_geo"] n_domain_geo --> n_address["address"] n_domain_geo --> n_geoip["geoip"] n_domain_geo --> n_units["units"]
Public surface
`crate root`
| Item | What it is |
|---|---|
pub const EARTH_RADIUS_METERS: f64 | Earth's mean radius in meters (WGS84). |
pub enum GeoError | Geographic errors. |
pub struct Coordinate | A geographic coordinate (latitude/longitude pair) |
Coordinate :: fn new(latitude : f64, longitude : f64) -> Result <Self, GeoError> | Create a new coordinate with validation |
Coordinate :: fn latitude(& self) -> f64 | Get the latitude. |
Coordinate :: fn longitude(& self) -> f64 | Get the longitude. |
Coordinate :: fn distance_to(& self, other : & Self) -> f64 | Calculate the distance to another coordinate in meters |
Coordinate :: fn bearing_to(& self, other : & Self) -> f64 | Calculate the initial bearing to another coordinate in degrees |
Coordinate :: fn midpoint(& self, other : & Self) -> Self | Calculate the midpoint between this coordinate and another. |
Coordinate :: fn destination(& self, bearing : f64, distance : f64) -> Self | Calculate a destination point given bearing and distance |
Coordinate :: fn is_within(& self, other : & Self, distance_meters : f64) -> bool | Check if this coordinate is within a given distance of another. |
pub struct BoundingBox | A rectangular geographic area defined by min/max coordinates. |
BoundingBox :: fn new(min : Coordinate, max : Coordinate) -> Self | Create a new bounding box. |
BoundingBox :: fn from_coordinates(coords : & Coordinate) -> Option <Self> | Create a bounding box from a set of coordinates |
BoundingBox :: fn contains(& self, point : & Coordinate) -> bool | Check if a point is within the bounding box. |
BoundingBox :: fn intersects(& self, other : & BoundingBox) -> bool | Check if this bounding box intersects another. |
BoundingBox :: fn expand(& self, point : & Coordinate) -> Self | Expand the bounding box to include a point. |
BoundingBox :: fn center(& self) -> Coordinate | Get the center of the bounding box. |
BoundingBox :: fn width(& self) -> f64 | Get the width in degrees longitude. |
BoundingBox :: fn height(& self) -> f64 | Get the height in degrees latitude. |
pub struct Address | A structured postal address. |
Address :: fn builder() -> AddressBuilder | Create a new address builder. |
Address :: fn format_single_line(& self) -> String | Format the address as a single line. |
Address :: fn format_multiline(& self) -> String | Format the address as multiple lines. |
pub struct AddressBuilder | Builder for Address. |
AddressBuilder :: fn new() -> Self | Create a new builder. |
AddressBuilder :: fn street1(mut self, street1 : impl Into <String>) -> Self | Set the primary street address. |
AddressBuilder :: fn street2(mut self, street2 : impl Into <String>) -> Self | Set the secondary street address. |
AddressBuilder :: fn city(mut self, city : impl Into <String>) -> Self | Set the city. |
AddressBuilder :: fn state(mut self, state : impl Into <String>) -> Self | Set the state or province. |
AddressBuilder :: fn postal_code(mut self, postal_code : impl Into <String>) -> Self | Set the postal code. |
AddressBuilder :: fn country(mut self, country : impl Into <String>) -> Self | Set the country. |
AddressBuilder :: fn build(self) -> Result <Address, GeoError> | Build the address |
pub enum PlaceType | Type of geographic place. |
pub struct Place | A named geographic location. |
Place :: fn builder() -> PlaceBuilder | Create a new place builder. |
Place :: fn has_coordinates(& self) -> bool | Check if this place has coordinates. |
Place :: fn has_address(& self) -> bool | Check if this place has an address. |
Place :: fn distance_to(& self, other : & Place) -> Option <f64> | Calculate distance to another place in meters |
Place :: fn id(& self) -> Uuid | — |
Place :: fn created_at(& self) -> DateTime <Utc> | — |
Place :: fn updated_at(& self) -> DateTime <Utc> | — |
Place :: fn deleted_at(& self) -> Option <DateTime <Utc>> | — |
pub struct PlaceBuilder | Builder for Place. |
PlaceBuilder :: fn new() -> Self | Create a new builder. |
PlaceBuilder :: fn name(mut self, name : impl Into <String>) -> Self | Set the place name. |
PlaceBuilder :: fn coordinate(mut self, coordinate : Coordinate) -> Self | Set the coordinate. |
PlaceBuilder :: fn address(mut self, address : Address) -> Self | Set the address. |
PlaceBuilder :: fn place_type(mut self, place_type : PlaceType) -> Self | Set the place type. |
PlaceBuilder :: fn timezone(mut self, timezone : impl Into <String>) -> Self | Set the timezone. |
PlaceBuilder :: fn build(self) -> Result <Place, GeoError> | Build the place |
pub struct ServiceArea | A polygonal geographic service area. |
ServiceArea :: fn builder() -> ServiceAreaBuilder | Create a new service area builder. |
ServiceArea :: fn contains(& self, point : & Coordinate) -> bool | Check if a point is within this service area |
ServiceArea :: fn bounding_box(& self) -> Option <BoundingBox> | Get the bounding box of this service area. |
ServiceArea :: fn centroid(& self) -> Option <Coordinate> | Calculate the centroid (center of mass) of the polygon. |
ServiceArea :: fn area_estimate(& self) -> f64 | Estimate the area in square meters |
ServiceArea :: fn vertex_count(& self) -> usize | Get the number of vertices in the boundary. |
ServiceArea :: fn id(& self) -> Uuid | — |
ServiceArea :: fn created_at(& self) -> DateTime <Utc> | — |
ServiceArea :: fn updated_at(& self) -> DateTime <Utc> | — |
ServiceArea :: fn deleted_at(& self) -> Option <DateTime <Utc>> | — |
pub struct ServiceAreaBuilder | Builder for ServiceArea. |
ServiceAreaBuilder :: fn new() -> Self | Create a new builder. |
ServiceAreaBuilder :: fn name(mut self, name : impl Into <String>) -> Self | Set the area name. |
ServiceAreaBuilder :: fn add_vertex(mut self, coord : Coordinate) -> Self | Add a vertex to the boundary. |
ServiceAreaBuilder :: fn boundary(mut self, boundary : Vec <Coordinate>) -> Self | Set the boundary from a vector of coordinates. |
ServiceAreaBuilder :: fn description(mut self, description : impl Into <String>) -> Self | Set the description. |
ServiceAreaBuilder :: fn is_active(mut self, is_active : bool) -> Self | Set whether the area is active. |
ServiceAreaBuilder :: fn build(self) -> Result <ServiceArea, GeoError> | Build the service area |
pub enum Direction | Cardinal and intercardinal directions. |
Direction :: fn from_bearing(bearing : f64) -> Self | Get the direction from a bearing in degrees. |
Direction :: fn bearing(& self) -> f64 | Get the bearing for this direction. |
Direction :: fn abbreviation(& self) -> & 'static str | Get the abbreviation (N, NE, E, etc.). |
`address`
| Item | What it is |
|---|---|
pub struct GeoAddress | A structured postal address (geo_addresses), column-for-column. |
pub struct GeoPlace | A named location (geo_places), optionally anchored to a GeoAddress via address_id. |
pub enum GeoRepoError | Errors from this module's queries |
async fn insert_address_tx(tx : & mut Transaction <'_, Postgres>, street1 : & str, street2 : Option <& str>, city : & str, state : Option <& str>, postal_code : Option <& str>, country : & str,) -> Result <GeoAddress, GeoRepoError> | Insert a geo_addresses row inside the caller's transaction |
async fn update_address_tx(tx : & mut Transaction <'_, Postgres>, id : Uuid, street1 : & str, street2 : Option <& str>, city : & str, state : Option <& str>, postal_code : Option <& str>, country : & str,) -> Result <Option <GeoAddress>, GeoRepoError> | Update a geo_addresses row in place, inside the caller's transaction |
async fn insert_place_tx(tx : & mut Transaction <'_, Postgres>, name : & str, address_id : Uuid,) -> Result <GeoPlace, GeoRepoError> | Insert a geo_places row anchored to address_id, inside the caller's transaction |
`geoip`
| Item | What it is |
|---|---|
pub struct GeoIpRecord | An approximate location resolved from an IP address |
GeoIpRecord :: fn is_empty(& self) -> bool | Whether no field resolved — an empty record is as good as no match, and callers generally store NULL geo for it. |
pub trait GeoIpResolver | Resolves IP addresses to approximate locations |
pub enum GeoIpError | Failure constructing a MaxMindGeoIpResolver. |
pub struct MaxMindGeoIpResolver | A GeoIpResolver backed by a local MaxMind GeoLite2 City .mmdb |
MaxMindGeoIpResolver :: fn open <P : AsRef <Path>>(path : P) -> Result <Self, GeoIpError> | Open a MaxMind .mmdb from a filesystem path |
MaxMindGeoIpResolver :: fn lookup(& self, ip : IpAddr) -> Option <GeoIpRecord> | — |
`units`
| Item | What it is |
|---|---|
fn meters_to_kilometers(m : f64) -> f64 | Convert meters to kilometers. |
fn meters_to_miles(m : f64) -> f64 | Convert meters to miles. |
fn meters_to_feet(m : f64) -> f64 | Convert meters to feet. |
fn kilometers_to_meters(km : f64) -> f64 | Convert kilometers to meters. |
fn miles_to_meters(mi : f64) -> f64 | Convert miles to meters. |
fn feet_to_meters(ft : f64) -> f64 | Convert feet to meters. |
Re-exports. Exported here, defined elsewhere.
| Export | Defined in |
|---|---|
{GeoIpError,GeoIpRecord,GeoIpResolver,MaxMindGeoIpResolver} | geoip::{GeoIpError,GeoIpRecord,GeoIpResolver,MaxMindGeoIpResolver} |
Boundary
Reaches into foundation.
Shares tier domain with 41 other crates: domain-agreements, domain-ai-report, domain-billing, domain-catalog, domain-classify, domain-comments, domain-competitive-intel, domain-contact, … (41 total).
_What this crate deliberately does NOT own is a judgment. No committed registry records one for it, so none is stated here._
Where it sits
| Tier (ontology) | domain |
| Architectural role (taxonomy) | unclassified (baselined) |
| Location | crates/domain/geo |
| Vocabulary in force (lexicon) | current |
Tier flow. Which tiers this crate's own edges cross.
flowchart LR n_domain["domain"] --> n_foundation["foundation"]
Dependencies
Runtime, in this workspace.
| Crate | Tier | Optional | Only on |
|---|---|---|---|
| `foundation-basemodels` | foundation | no | always |
Runtime, from outside the workspace.
| Crate | Requirement | Features | Optional | Only on |
|---|---|---|---|---|
chrono | ^0.4 | serde | no | always |
maxminddb | ^0.27 | — | yes | always |
serde | ^1 | derive | no | always |
serde_json | ^1 | — | no | always |
sqlx | ^0.8 | runtime-tokio, postgres, chrono, uuid | no | always |
thiserror | ^2 | — | no | always |
uuid | ^1 | v4, serde | no | always |
Development, from outside the workspace.
| Crate | Requirement | Features | Optional | Only on |
|---|---|---|---|---|
tokio-test | ^0.4 | — | no | always |
Build. None.
Depended on by. 3 workspace crates.
Signal flow — what reaches this crate, and what it reaches.
flowchart LR n_application_geo["application-geo"] -->|uses| SELF n_identity_party_places["identity-party-places"] -->|uses| SELF n_platform_privacy_scan_api["platform-privacy-scan-api"] -->|uses| SELF SELF["domain-geo"] SELF -->|runtime| n_foundation_basemodels["foundation-basemodels"] classDef self fill:#1f883d,stroke:#1f883d,color:#fff; class SELF self;
Feature flags
| Feature | Enables | On by default |
|---|---|---|
default | — | yes |
geoip | dep:maxminddb | no |
flowchart LR n_default["default"] n_geoip["geoip"] --> n_dep_maxminddb["dep:maxminddb"]
Targets
| Kind | Name | Source |
|---|---|---|
| lib | domain_geo | `src/lib.rs` |
Error model
| Error type | Named by |
|---|---|
GeoError | declared, no public signature returns it |
GeoIpError | declared, no public signature returns it |
GeoRepoError | insert_address_tx, insert_place_tx, update_address_tx |
Operational characteristics
| Property | Evidence |
|---|---|
| async public surface | yes |
| async runtime | none detected |
| database access | yes |
| network I/O | none detected |
| unsafe code | none detected |
| environment variables | none detected |
No unsafe block, unsafe fn, unsafe impl or unsafe trait was found by the parser anywhere in this crate's source.
Configuration
No environment variable is read with a literal name anywhere in this crate. A variable whose key is computed at run time cannot be listed here, and is not claimed to be absent.
Related capabilities
3 workspace crates depend on this one: application-geo, identity-party-places, platform-privacy-scan-api.
Verification
| Kind | Count |
|---|---|
| Unit tests | 55 |
| Integration tests | 0 |
| Examples | 0 |
| Doctests | 1 |
Evidence by module. How often each public module is named by something executable.
| Module | Tests | Examples | Consumers |
|---|---|---|---|
crate root | 12 | 0 | 2 |
address | 6 | 0 | 4 |
geoip | 4 | 0 | 0 |
units | 6 | 0 | 1 |
What the tests establish, by name:
geo_repo_error_wraps_sqlx_error—src/address.rsa_city_record_maps_every_field—src/geoip.rsa_city_with_nothing_usable_is_not_a_record—src/geoip.rsempty_record_reports_empty—src/geoip.rsenglish_name_falls_back_to_any_language—src/geoip.rsenglish_name_of_empty_is_none—src/geoip.rsenglish_name_prefers_en—src/geoip.rsopen_missing_file_is_error—src/geoip.rspopulated_record_is_not_empty—src/geoip.rstest_address_builder—src/lib.rstest_address_builder_missing_required—src/lib.rstest_address_format_multiline—src/lib.rstest_address_format_single_line—src/lib.rstest_address_serialization—src/lib.rstest_bounding_box_center—src/lib.rstest_bounding_box_contains—src/lib.rstest_bounding_box_expand—src/lib.rstest_bounding_box_from_coordinates—src/lib.rstest_bounding_box_intersects—src/lib.rstest_coordinate_bearing—src/lib.rstest_coordinate_destination—src/lib.rstest_coordinate_distance_london_to_paris—src/lib.rstest_coordinate_distance_nyc_to_la—src/lib.rstest_coordinate_distance_same_point—src/lib.rstest_coordinate_edge_values—src/lib.rstest_coordinate_is_within—src/lib.rstest_coordinate_midpoint—src/lib.rstest_coordinate_new_invalid_latitude—src/lib.rstest_coordinate_new_invalid_longitude—src/lib.rstest_coordinate_new_valid—src/lib.rs- _… 25 more_
Documentation coverage
| Measure | Documented | Total |
|---|---|---|
| Public items with rustdoc | 84 | 93 |
Public modules with a //! block | 2 | 3 |
pie showData
title Public items with rustdoc
"Documented" : 84
"No rustdoc detected" : 9
Metrics
| Metric | Value |
|---|---|
| Rust source files | 3 |
| Source lines | 2015 |
| Code lines | 1384 |
| Public API items | 93 |
| Public modules | 3 |
| Tests | 55 |
| Examples | 0 |
| Cargo features | 2 |
| Direct runtime dependencies | 8 |
| Workspace reverse dependencies | 3 |
pie showData
title Public API by kind
"constant" : 1
"enum" : 5
"function" : 9
"method" : 65
"struct" : 12
"trait" : 1
pie showData
title Rust source composition
"Code" : 1384
"Blank or comment" : 631
Generation
Rendered by tools-corpus corpus readme from repository evidence alone, renderer schema 2, lexicon current. No model, network service or database was consulted. Regenerate with tools-corpus corpus readme --write; verify with --check.