Struct oldnav_lib::navdata::country::Country [] [src]

pub struct Country {
    pub code: String,
    pub name: String,
}

Represents a country on earth that is recognised in the icao codes.

Fields

code: String

The icao code of the country

name: String

The name of the country

Methods

impl Country
[src]

fn new<S: Into<String>>(code: S, name: S) -> Country

Constructor for the Country struct.

Examples

let new_country = Country::new("AG", "Solomon Islands");
assert_eq!(new_country.code, "AG".to_string());
assert_eq!(new_country.name, "Solomon Islands".to_string());

Trait Implementations

impl Debug for Country
[src]

fn fmt(&self, f: &mut Formatter) -> Result

Formats the value using the given formatter.