pub struct Countries { /* private fields */ }Implementations§
Source§impl Countries
impl Countries
pub fn new() -> Result<Self>
Sourcepub fn lookup_by_code(&self, code: &str) -> Option<Country>
pub fn lookup_by_code(&self, code: &str) -> Option<Country>
Lookup country by 2-letter country code
Sourcepub fn lookup_by_name(&self, name: &str) -> Vec<Country>
pub fn lookup_by_name(&self, name: &str) -> Vec<Country>
Lookup country by country name
This function is case-insensitive and search for countries with name that contains the given name string
Sourcepub fn all_countries(&self) -> Vec<Country>
pub fn all_countries(&self) -> Vec<Country>
Get all countries
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Countries
impl<'de> Deserialize<'de> for Countries
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
Source§impl LazyLoadable for Countries
impl LazyLoadable for Countries
Auto Trait Implementations§
impl Freeze for Countries
impl RefUnwindSafe for Countries
impl Send for Countries
impl Sync for Countries
impl Unpin for Countries
impl UnwindSafe for Countries
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)