pub struct PartialAddress {Show 16 fields
pub address_number: Option<i64>,
pub address_number_suffix: Option<String>,
pub street_name_pre_directional: Option<StreetNamePreDirectional>,
pub pre_modifier: Option<StreetNamePreModifier>,
pub pre_type: Option<StreetNamePreType>,
pub separator: Option<StreetSeparator>,
pub street_name: Option<String>,
pub street_name_post_type: Option<StreetNamePostType>,
pub subaddress_type: Option<SubaddressType>,
pub subaddress_identifier: Option<String>,
pub floor: Option<i64>,
pub building: Option<String>,
pub zip_code: Option<i64>,
pub postal_community: Option<PostalCommunity>,
pub state_name: Option<State>,
pub status: Option<AddressStatus>,
}Expand description
The PartialAddress struct contains optional fields so that incomplete or missing data can be
compared against Addresses or PartialAddresses for potential matches. Used to help
match address information that does not parse into a full valid address.
Fields§
§address_number: Option<i64>The address_number field represents the address number component of the complete address
number.
address_number_suffix: Option<String>The number_suffix field represents the address number suffix component of the complete
address number.
street_name_pre_directional: Option<StreetNamePreDirectional>The directional field represents the street name pre directional component of the
complete street name.
pre_modifier: Option<StreetNamePreModifier>The pre_modifier field represents the street name pre modifier component of the complete
street name.
pre_type: Option<StreetNamePreType>The pre_type field represents the street name pre type component of the complete street
name.
separator: Option<StreetSeparator>The separator field represents the separator element component of the complete street
name.
street_name: Option<String>The street_name field represents the street name component of the complete street name.
street_name_post_type: Option<StreetNamePostType>The street_type field represents the street name post type component of the complete street
name.
subaddress_type: Option<SubaddressType>The subaddress_type field represents the subaddress type component of the complete
subaddress.
subaddress_identifier: Option<String>The subaddress_id field represents the subaddress identifier component of the complete
subaddress.
floor: Option<i64>The floor field represents the floor identifier, corresponding to the Floor field from the NENA standard.
building: Option<String>The building field represents the building identifier, corresponding to the Building field from the NENA standard.
zip_code: Option<i64>The zip field represents the postal zip code of the address.
postal_community: Option<PostalCommunity>The postal_community field represents the postal community component of the address,
being either the unincorporated or incorporated municipality name.
state_name: Option<State>The state field represents the state name component of the address.
status: Option<AddressStatus>The status field represents the local status of the address as determined by the relevant
addressing authority.
Implementations§
Source§impl PartialAddress
impl PartialAddress
Sourcepub fn address_number(&self) -> Option<i64>
pub fn address_number(&self) -> Option<i64>
The address_number field represents the address number component of the complete address
number. This function returns the value of the field.
Sourcepub fn address_number_suffix(&self) -> Option<String>
pub fn address_number_suffix(&self) -> Option<String>
The address_number_suffix field represents the address number suffix component of the
complete address number. This function returns the cloned value of the field.
Sourcepub fn street_name_pre_directional(&self) -> Option<StreetNamePreDirectional>
pub fn street_name_pre_directional(&self) -> Option<StreetNamePreDirectional>
The street_name_pre_directional field represents the street name predirectional component of the
complete street name. This function returns the cloned value of the field.
Sourcepub fn pre_modifier(&self) -> Option<StreetNamePreModifier>
pub fn pre_modifier(&self) -> Option<StreetNamePreModifier>
The pre_modifier field represents the street name premodifier component of the
complete street name. This function returns the cloned value of the field.
Sourcepub fn pre_type(&self) -> Option<StreetNamePreType>
pub fn pre_type(&self) -> Option<StreetNamePreType>
The pre_type field represents the street name pretype component of the
complete street name. This function returns the cloned value of the field.
Sourcepub fn separator(&self) -> Option<StreetSeparator>
pub fn separator(&self) -> Option<StreetSeparator>
The separator field represents the street name separator component of the
complete street name. This function returns the cloned value of the field.
Sourcepub fn street_name(&self) -> Option<String>
pub fn street_name(&self) -> Option<String>
The street_name field represents the street name component of the complete street name.
This function returns the cloned value of the field.
Sourcepub fn street_name_post_type(&self) -> Option<StreetNamePostType>
pub fn street_name_post_type(&self) -> Option<StreetNamePostType>
The street_name_post_type field represents the street name posttype component of the complete street
name. This function returns the cloned value of the field.
Sourcepub fn subaddress_type(&self) -> Option<SubaddressType>
pub fn subaddress_type(&self) -> Option<SubaddressType>
The subaddress_type field represents the subaddress type component of the complete
subaddress. This function returns the cloned value of the field.
Sourcepub fn subaddress_identifier(&self) -> Option<String>
pub fn subaddress_identifier(&self) -> Option<String>
The subaddress_identifier field represents the subaddress identifier component of the complete
subaddress. This function returns the cloned value of the field.
Sourcepub fn building(&self) -> Option<String>
pub fn building(&self) -> Option<String>
The building field represents the unique identifier for a building. This function
returns the cloned value of the field.
Sourcepub fn floor(&self) -> Option<i64>
pub fn floor(&self) -> Option<i64>
The floor field represents the floor of the building on which the address point is located. This function returns the value of the field.
Sourcepub fn set_address_number(&mut self, value: i64)
pub fn set_address_number(&mut self, value: i64)
Sets the value of the address_number field to Some(value).
Sourcepub fn set_address_number_suffix(&mut self, value: Option<&str>)
pub fn set_address_number_suffix(&mut self, value: Option<&str>)
Sets the value of the address_number_suffix field to Some(value).
Sourcepub fn set_pre_directional(&mut self, value: &StreetNamePreDirectional)
pub fn set_pre_directional(&mut self, value: &StreetNamePreDirectional)
Sets the value of the street_name_pre_directional field to Some(value).
Sourcepub fn set_street_name(&mut self, value: &str)
pub fn set_street_name(&mut self, value: &str)
Sets the value of the street_name field to Some(value).
Sourcepub fn set_post_type(&mut self, value: &StreetNamePostType)
pub fn set_post_type(&mut self, value: &StreetNamePostType)
Sets the value of the street_name_post_type field to Some(value).
Sourcepub fn set_subaddress_type(&mut self, value: &SubaddressType)
pub fn set_subaddress_type(&mut self, value: &SubaddressType)
Sets the value of the subaddress_type field to Some(value).
Sourcepub fn set_subaddress_identifier(&mut self, value: &str)
pub fn set_subaddress_identifier(&mut self, value: &str)
Sets the value of the subaddress_identifier field to Some(value).
Sourcepub fn label(&self) -> String
pub fn label(&self) -> String
Returns a String representing the address label, consisting of the complete address number, complete street name and complete subaddress, used to produce map or mailing labels.
Sourcepub fn mailing(&self) -> String
pub fn mailing(&self) -> String
The mailing method prints the label format of the address, including postal community,
state and zip code.
Sourcepub fn complete_address(&self) -> String
pub fn complete_address(&self) -> String
Returns a String representing the address label, consisting of the complete address number, complete street name and complete subaddress, used for the fully-disambiguated representation.
Sourcepub fn standardize(&mut self)
pub fn standardize(&mut self)
The standardize method takes county address naming conventions and converts them to city
naming conventions.
Trait Implementations§
Source§impl Clone for PartialAddress
impl Clone for PartialAddress
Source§fn clone(&self) -> PartialAddress
fn clone(&self) -> PartialAddress
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PartialAddress
impl Debug for PartialAddress
Source§impl Default for PartialAddress
impl Default for PartialAddress
Source§fn default() -> PartialAddress
fn default() -> PartialAddress
Source§impl<'de> Deserialize<'de> for PartialAddress
impl<'de> Deserialize<'de> for PartialAddress
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 Hash for PartialAddress
impl Hash for PartialAddress
Source§impl Ord for PartialAddress
impl Ord for PartialAddress
Source§fn cmp(&self, other: &PartialAddress) -> Ordering
fn cmp(&self, other: &PartialAddress) -> 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 PartialAddress
impl PartialEq for PartialAddress
Source§impl PartialOrd for PartialAddress
impl PartialOrd for PartialAddress
Source§impl Serialize for PartialAddress
impl Serialize for PartialAddress
impl Eq for PartialAddress
impl StructuralPartialEq for PartialAddress
Auto Trait Implementations§
impl Freeze for PartialAddress
impl RefUnwindSafe for PartialAddress
impl Send for PartialAddress
impl Sync for PartialAddress
impl Unpin for PartialAddress
impl UnwindSafe for PartialAddress
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