#[non_exhaustive]pub struct Country {
pub official_name: String,
pub short_name: String,
pub iso2: String,
pub iso3: String,
pub num3: u16,
}Expand description
Represents a country and holds various information about it.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.official_name: StringThe ‘official’ name of the country, or at least as close as it gets.
short_name: StringThe commonly used short form of the country name.
iso2: StringISO 3166-1 alpha-2 code of the country.
iso3: StringISO 3166-1 alpha-3 code of the country.
num3: u16ISO 3166-1 numeric-3 code of the country.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Country
impl<'de> Deserialize<'de> for Country
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Country
impl StructuralPartialEq for Country
Auto Trait Implementations§
impl Freeze for Country
impl RefUnwindSafe for Country
impl Send for Country
impl Sync for Country
impl Unpin for Country
impl UnwindSafe for Country
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