Place Capitals Crate
The Place Capitals Crate is a Rust library designed to provide easy access to static data related to countries, their capitals, and USA states and their capitals. This crate offers convenient functions to check whether a given place is a country or a USA state, as well as the ability to retrieve the capital for a given place.
Features
- Place Type Detection: Determine whether a given place is a country or a USA state.
- Capital Lookup: Retrieve the capital associated with a specific country or USA state.
Installation
To use the Place Capitals Crate in your Rust project, add it as a dependency in your Cargo.toml file:
[]
= "0.1.0"
Usage
First, import the crate in your Rust project:
extern crate place_capitals;
use PlaceDetector;
Example 1: Detecting Place Type
Example 2: Retrieving Capital
License
This crate is distributed under the terms of the MIT License. See the LICENSE file for details.
Contribution
Contributions to this crate are welcome! If you encounter any issues or have ideas for improvements, please open an issue or submit a pull request on the GitHub repository.