pub struct Country {
pub code: &'static str,
pub name: &'static str,
}Expand description
A country with its ISO 3166-1 alpha-2 code and name.
§Examples
use countries::Country;
let country = Country { code: "FR", name: "France" };
assert_eq!(country.code, "FR");
assert_eq!(country.name, "France");Fields§
§code: &'static str§name: &'static strTrait Implementations§
impl Copy for Country
Source§impl Deserialize<'static> for Country
impl Deserialize<'static> for Country
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'static>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'static>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Country
impl RefUnwindSafe for Country
impl Send for Country
impl Sync for Country
impl Unpin for Country
impl UnsafeUnpin 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