Expand description
Nationify is a Rust library designed for querying and managing country-related data. It provides an intuitive interface for retrieving information such as ISO codes, names, regions, languages, and geographical data.
Structs§
- Bounds
- Geographic bounding box.
- Country
- Country information.
- Geo
- Geographic coordinates.
- LatLng
- Geographic coordinates.
- Port
- Port information.
- Port
Statistics - Statistics about the ports database.
Statics§
- PORTS
- Static array of all ports in the database.
Functions§
- all_
ports - Return list of all ports.
- by_
continent - Return list of all countries in a specific continent.
- by_
country_ name - Find a country by its name.
- by_
country_ name_ or_ code - Find a country by its name or ISO code.
- by_
country_ name_ or_ code_ case_ insensitive - Find a country by its name or ISO code, case insensitive.
- by_
economic_ union - Return list of all countries in a specific economic union.
- by_
iso_ code - Find a country by its ISO code - using PHF for fast lookups.
- by_
languages_ official - Return list of all countries with a specific official language.
- by_
languages_ spoken - Return list of all countries with a specific spoken language.
- by_
region - Return list of all countries in a specific region.
- by_
region_ or_ subregion - Return list of all countries in a specific region or subregion.
- by_
region_ or_ subregion_ case_ insensitive - Return list of all countries in a specific region or subregion.
- by_
subregion - Return list of all countries in a specific subregion.
- closest_
port - Find the closest port to the given coordinates.
- closest_
ports - Find the N closest ports to the given coordinates.
- continents
- Return list of all continents.
- country_
names - Return list of all country names
- economic_
unions - Return list of all economic unions.
- iso_
codes - Return list of all country codes
- port_
by_ code - Find a port by its port code.
- port_
by_ unloc - Find a port by its UNLOC code.
- port_
cities - Return list of all unique cities with ports.
- port_
countries - Return list of all unique countries with ports.
- port_
statistics - Get statistics about ports (total, countries, cities, timezones).
- port_
timezones - Return list of all unique timezones across all ports.
- ports_
by_ city - Return list of all ports in a specific city.
- ports_
by_ country - Return list of all ports in a specific country.
- ports_
by_ name - Return list of all ports matching a specific name.
- ports_
by_ region - Find all ports serving a specific region.
- ports_
by_ state - Return list of all ports in a specific state/province.
- ports_
by_ timezone - Return list of all ports in a specific timezone.
- ports_
count - Count the total number of ports.
- ports_
count_ by_ country - Count ports by country.
- ports_
in_ bounding_ box - Find ports in a bounding box defined by min/max latitude and longitude.
- ports_
within_ radius - Find ports within a radius (in kilometers) of given coordinates.
- regions
- Return list of all regions.
- search_
ports - Search ports by query string (searches name, city, code, unlocs).
- world_
regions - Return list of all world regions.
- world_
subregions - Return list of all world subregions.