pub enum PostalCommunity {
GrantsPass,
Medford,
Merlin,
}Expand description
The PostalCommunity enum holds valid variants for the postal community field of an address.
The list of valid postal communities is limited to the set of communities encountered locally,
and we add new variants as needed.
This enum exists to facilitate parsing addresses. Because street names and types can parse ambiguously, it can be unclear during a parse whether a word should be parsed as a street name, street type or postal community. By ensuring the postal community maps to a valid value, we can reduce the risk of parsing a word to the wrong address element.
Variants§
GrantsPass
The City of Grants Pass, an incorporated municipality and unincorporated community.
Medford
The City of Medford, an incorporated municipality.
Merlin
The City of Merlin, an unincorporated community.
Implementations§
Source§impl PostalCommunity
impl PostalCommunity
Trait Implementations§
Source§impl Clone for PostalCommunity
impl Clone for PostalCommunity
Source§fn clone(&self) -> PostalCommunity
fn clone(&self) -> PostalCommunity
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PostalCommunity
impl Debug for PostalCommunity
Source§impl Default for PostalCommunity
impl Default for PostalCommunity
Source§fn default() -> PostalCommunity
fn default() -> PostalCommunity
Source§impl<'de> Deserialize<'de> for PostalCommunity
impl<'de> Deserialize<'de> for PostalCommunity
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>,
Source§impl Display for PostalCommunity
impl Display for PostalCommunity
Source§impl FromStr for PostalCommunity
impl FromStr for PostalCommunity
Source§impl Hash for PostalCommunity
impl Hash for PostalCommunity
Source§impl IntoEnumIterator for PostalCommunity
impl IntoEnumIterator for PostalCommunity
Source§impl Ord for PostalCommunity
impl Ord for PostalCommunity
Source§fn cmp(&self, other: &PostalCommunity) -> Ordering
fn cmp(&self, other: &PostalCommunity) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for PostalCommunity
impl PartialEq for PostalCommunity
Source§impl PartialOrd for PostalCommunity
impl PartialOrd for PostalCommunity
Source§impl Serialize for PostalCommunity
impl Serialize for PostalCommunity
impl Copy for PostalCommunity
impl Eq for PostalCommunity
impl StructuralPartialEq for PostalCommunity
Auto Trait Implementations§
impl Freeze for PostalCommunity
impl RefUnwindSafe for PostalCommunity
impl Send for PostalCommunity
impl Sync for PostalCommunity
impl Unpin for PostalCommunity
impl UnwindSafe for PostalCommunity
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more