pub struct CountryCode(/* private fields */);Expand description
ISO-3166-1 alpha-2 country code, stored lowercased (e.g. pl, de).
A newtype so a geo requirement can’t be confused with an arbitrary
string and is validated at the boundary.
Implementations§
Trait Implementations§
Source§impl Clone for CountryCode
impl Clone for CountryCode
Source§fn clone(&self) -> CountryCode
fn clone(&self) -> CountryCode
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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<'de> Deserialize<'de> for CountryCode
impl<'de> Deserialize<'de> for CountryCode
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 CountryCode
Source§impl From<CountryCode> for String
impl From<CountryCode> for String
Source§fn from(c: CountryCode) -> Self
fn from(c: CountryCode) -> Self
Converts to this type from the input type.
Source§impl Hash for CountryCode
impl Hash for CountryCode
Source§impl PartialEq for CountryCode
impl PartialEq for CountryCode
Source§fn eq(&self, other: &CountryCode) -> bool
fn eq(&self, other: &CountryCode) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for CountryCode
impl Serialize for CountryCode
impl StructuralPartialEq for CountryCode
Auto Trait Implementations§
impl Freeze for CountryCode
impl RefUnwindSafe for CountryCode
impl Send for CountryCode
impl Sync for CountryCode
impl Unpin for CountryCode
impl UnsafeUnpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.