pub struct CountryCode(/* private fields */);Expand description
A two letter, uppercase country code.
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 · 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<CountryCode, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<CountryCode, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for CountryCode
impl Display for CountryCode
Source§impl Hash for CountryCode
impl Hash for CountryCode
Source§impl IpData for CountryCode
impl IpData for CountryCode
Source§fn from_record(
record: &StringRecord,
) -> Result<Option<CountryCode>, FromCsvError>
fn from_record( record: &StringRecord, ) -> Result<Option<CountryCode>, FromCsvError>
db-ip data consists of csv records, any data must be derived from then.
Should return [
Err(Error::InvalidRecord)] if the fields are insufficient and the loading should
be aborted, and [Ok(None)] if the field is fine, but the data is irrelevant. Read moreSource§impl PartialEq for CountryCode
impl PartialEq for CountryCode
Source§impl Serialize for CountryCode
impl Serialize for CountryCode
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Copy for CountryCode
impl Eq 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 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