[][src]Struct jurisdiction::Jurisdiction

pub struct Jurisdiction { /* fields omitted */ }

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]

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.

impl PartialEq<Alpha2> for Jurisdiction[src]

impl PartialEq<Alpha3> for Jurisdiction[src]

impl PartialEq<Jurisdiction> for Jurisdiction[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.