[−][src]Struct jurisdiction::Jurisdiction
A pointer sized object encoding countries and areas of the world.
The size of this structure is minimized such that passing it around will be limited overhead, with implemented methods performing lookup in static table instead.
Methods
impl Jurisdiction
[src]
pub fn name(&self) -> &str
[src]
Return the english name of this jurisdiction.
pub fn country_code(&self) -> u16
[src]
Return the ISO-3166 numeric country code made up of 3 characters.
Origin
The definition is sourced from ISO-3166 standard.
pub fn alpha2(&self) -> Alpha2
[src]
Return the two letter Alpha2 representation for this Jurisdiction
.
Origin
The definition is sourced from ISO-3166 standard.
pub fn alpha3(&self) -> Alpha3
[src]
Return the two letter Alpha3 representation for this Jurisdiction
.
Origin
The definition is sourced from the ISO-3166 standard.
pub fn region(&self) -> Region
[src]
Return the Region on earth this Jurisdiction
is situated in.
Origin
The definition is sourced from the statistics division of the UN for standard country and area codes for statistical use (M49).
pub fn sub_region(&self) -> SubRegion
[src]
Return the SubRegion of a Region this Jurisdiction
is situated in.
Origin
The definition is sourced from the statistics division of the UN for standard country and area codes for statistical use (M49).
pub fn intermediate_region(&self) -> IntermediateRegion
[src]
Return the IntermediateRegion of a SubRegion this Jurisdiction
is situated in.
Not all Jursidictions
has a defined IntermediateRegion
. These will thus return Undefined.
Origin
The definition is sourced from the statistics division of the UN for standard country and area codes for statistical use (M49).
pub fn region_code(&self) -> u16
[src]
Return the 3 character numeric identifier for the Region this Jurisdiction
is situated in.
Origin
The definition is sourced from the statistics division of the UN for standard country and area codes for statistical use (M49).
pub fn sub_region_code(&self) -> u16
[src]
Return the 3 character numeric identifier for the SubRegion this Jurisdiction
is situated in.
Origin
The definition is sourced from the statistics division of the UN for standard country and area codes for statistical use (M49).
pub fn intermediate_region_code(&self) -> Option<u16>
[src]
Return the 3 character numeric identifier for the IntermediateRegion
this Jurisdiction
is situated in.
Origin
The definition is sourced from the statistics division of the UN for standard country and area codes for statistical use (M49).
pub fn in_region(region: Region) -> Vec<Jurisdiction>
[src]
Return all Jurisdictions zoning to specified region.
pub fn in_sub_region(sub: SubRegion) -> Vec<Jurisdiction>
[src]
Return all Jurisdictions zoning to specified sub region.
pub fn in_intermediate_region(inter: IntermediateRegion) -> Vec<Jurisdiction>
[src]
Return all Jurisdictions zoning to specified sub region.
Trait Implementations
impl Clone for Jurisdiction
[src]
fn clone(&self) -> Jurisdiction
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for Jurisdiction
[src]
impl From<Alpha2> for Jurisdiction
[src]
impl From<Alpha3> for Jurisdiction
[src]
impl FromStr for Jurisdiction
[src]
type Err = Error
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Self, Self::Err>
[src]
impl PartialEq<Alpha2> for Jurisdiction
[src]
impl PartialEq<Alpha3> for Jurisdiction
[src]
impl PartialEq<Jurisdiction> for Jurisdiction
[src]
Auto Trait Implementations
impl RefUnwindSafe for Jurisdiction
impl Send for Jurisdiction
impl Sync for Jurisdiction
impl Unpin for Jurisdiction
impl UnwindSafe for Jurisdiction
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,