Struct rust_iso3166::CountryCode
source · pub struct CountryCode {
pub name: &'static str,
pub alpha2: &'static str,
pub alpha3: &'static str,
pub numeric: i32,
}
Fields§
§name: &'static str
English short name
alpha2: &'static str
Alpha-2 code
alpha3: &'static str
Alpha-3 code
numeric: i32
Numeric code
Implementations§
source§impl CountryCode
impl CountryCode
sourcepub fn numeric_str(&self) -> String
pub fn numeric_str(&self) -> String
Return len 3 String for CountryCode numeric
sourcepub fn subdivisions(&self) -> Option<&[Subdivision]>
pub fn subdivisions(&self) -> Option<&[Subdivision]>
Return Subdivision for ISO 3166-2
Trait Implementations§
source§impl Clone for CountryCode
impl Clone for CountryCode
source§fn clone(&self) -> CountryCode
fn clone(&self) -> CountryCode
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for CountryCode
impl Debug for CountryCode
source§impl Hash for CountryCode
impl Hash for CountryCode
source§impl PartialEq<CountryCode> for CountryCode
impl PartialEq<CountryCode> for CountryCode
source§fn eq(&self, other: &CountryCode) -> bool
fn eq(&self, other: &CountryCode) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.