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 Ord for CountryCode
impl Ord for CountryCode
source§fn cmp(&self, other: &CountryCode) -> Ordering
fn cmp(&self, other: &CountryCode) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for CountryCode
impl PartialEq 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 ==
.source§impl PartialOrd for CountryCode
impl PartialOrd for CountryCode
source§fn partial_cmp(&self, other: &CountryCode) -> Option<Ordering>
fn partial_cmp(&self, other: &CountryCode) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for CountryCode
impl Eq for CountryCode
impl StructuralPartialEq for CountryCode
Auto Trait Implementations§
impl RefUnwindSafe for CountryCode
impl Send for CountryCode
impl Sync for CountryCode
impl Unpin for CountryCode
impl UnwindSafe for CountryCode
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more