Expand description
Load and search in a CTY database
licensed under CC BY-SA 4.0, To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/4.0/
Author: Andreas, df1asc@darc.de
§Example
use hamcty::{CountryDatabase, CtyType, load_recent_cty};
fn main() {
// Use crate internal data (maybe not up to date)...
let cdb = CountryDatabase::new();
// ...or load recent CTY and load data from path (you decide about the version)
load_recent_cty("cty.csv", CtyType::Cty).expect("Could not load recent CTY");
let cdb = CountryDatabase::from_path("cty.csv").expect("Could not load cty data");
let call = "DF1ASC";
assert_eq!(cdb.country(call).unwrap().code, "DL");
assert_eq!(cdb.prefix(call), Ok("DF".to_string()));
}Modules§
Structs§
- Country
- Holds a country information set
- Country
Database - Holds the complete country database
- Location
- Coordinates for a location
Enums§
- Continent
- Continents
Constants§
Type Aliases§
- CQZone
- CQ zone number
- Country
Code - Ham radio country code
- Country
Map - Maps the Ham radio country code to the country information
- DXCC
Entity - DXCC entity code
- ITUZone
- ITU zone number
- Time
Offset - UTC time offset