pub struct Address {
pub formatted_address: String,
pub postal_address: PostalAddress,
pub address_components: Vec<AddressComponent>,
pub missing_component_types: Vec<String>,
pub unconfirmed_component_types: Vec<String>,
pub unresolved_tokens: Vec<String>,
}Expand description
Details of the post-processed address. Post-processing includes correcting misspelled parts of the address, replacing incorrect parts, and inferring missing parts.
The address property provides formatting for the processed address
provided in the request, along with component-level summaries of the
address, including misspelled parts of the address, replaced incorrect
parts, and inferred missing parts.
Fields§
§formatted_address: StringThe post-processed address, formatted as a single-line address following the address formatting rules of the region where the address is located.
Note: the format of this address may not match the format of the address
in the postalAddress field. For example, the postalAddress always
represents the country as a 2 letter regionCode, such as “US” or “NZ”.
By contrast, this field uses a longer form of the country name, such as
“USA” or “New Zealand”.
postal_address: PostalAddressThe post-processed address represented as a postal address.
address_components: Vec<AddressComponent>Unordered list. The individual address components of the formatted and corrected address, along with validation information. This provides information on the validation status of the individual components.
Address components are not ordered in a particular way. Do not make any assumptions on the ordering of the address components in the list.
missing_component_types: Vec<String>The types of components that were expected to be present in a correctly
formatted mailing address but were not found in the input AND could not
be inferred. Components of this type are not present in
formattedAddress, postalAddress, or addressComponents. An example
might be ['street_number', 'route'] for an input like “Boulder,
Colorado, 80301, USA”. The list of possible types can be found
here.
unconfirmed_component_types: Vec<String>The types of the components that are present in the addressComponents
but could not be confirmed to be correct. This field is provided for the
sake of convenience: its contents are equivalent to iterating through
the addressComponents to find the types of all the components where
the
confirmationLevel
is not CONFIRMED
or the inferred flag is not set to true. The list of possible types
can be found here.
unresolved_tokens: Vec<String>Any tokens in the input that could not be resolved. This might be an
input that was not recognized as a valid part of an address. For
example, for an input such as “Parcel 0000123123 & 0000456456 Str #
Guthrie Center IA 50115 US”, the unresolved tokens might look like
["Parcel", "0000123123", "&", "0000456456"].
Implementations§
Source§impl Address
impl Address
Sourcepub fn formatted_address(&self) -> &String
pub fn formatted_address(&self) -> &String
The post-processed address, formatted as a single-line address following the address formatting rules of the region where the address is located.
Note: the format of this address may not match the format of the address
in the postalAddress field. For example, the postalAddress always
represents the country as a 2 letter regionCode, such as “US” or “NZ”.
By contrast, this field uses a longer form of the country name, such as
“USA” or “New Zealand”.
Sourcepub fn postal_address(&self) -> &PostalAddress
pub fn postal_address(&self) -> &PostalAddress
The post-processed address represented as a postal address.
Sourcepub fn address_components(&self) -> &Vec<AddressComponent>
pub fn address_components(&self) -> &Vec<AddressComponent>
Unordered list. The individual address components of the formatted and corrected address, along with validation information. This provides information on the validation status of the individual components.
Address components are not ordered in a particular way. Do not make any assumptions on the ordering of the address components in the list.
Sourcepub fn missing_component_types(&self) -> &Vec<String>
pub fn missing_component_types(&self) -> &Vec<String>
The types of components that were expected to be present in a correctly
formatted mailing address but were not found in the input AND could not
be inferred. Components of this type are not present in
formattedAddress, postalAddress, or addressComponents. An example
might be ['street_number', 'route'] for an input like “Boulder,
Colorado, 80301, USA”. The list of possible types can be found
here.
Sourcepub fn unconfirmed_component_types(&self) -> &Vec<String>
pub fn unconfirmed_component_types(&self) -> &Vec<String>
The types of the components that are present in the addressComponents
but could not be confirmed to be correct. This field is provided for the
sake of convenience: its contents are equivalent to iterating through
the addressComponents to find the types of all the components where
the
confirmationLevel
is not CONFIRMED
or the inferred flag is not set to true. The list of possible types
can be found here.
Sourcepub fn unresolved_tokens(&self) -> &Vec<String>
pub fn unresolved_tokens(&self) -> &Vec<String>
Any tokens in the input that could not be resolved. This might be an
input that was not recognized as a valid part of an address. For
example, for an input such as “Parcel 0000123123 & 0000456456 Str #
Guthrie Center IA 50115 US”, the unresolved tokens might look like
["Parcel", "0000123123", "&", "0000456456"].
Source§impl Address
impl Address
Sourcepub fn formatted_address_mut(&mut self) -> &mut String
pub fn formatted_address_mut(&mut self) -> &mut String
The post-processed address, formatted as a single-line address following the address formatting rules of the region where the address is located.
Note: the format of this address may not match the format of the address
in the postalAddress field. For example, the postalAddress always
represents the country as a 2 letter regionCode, such as “US” or “NZ”.
By contrast, this field uses a longer form of the country name, such as
“USA” or “New Zealand”.
Sourcepub fn postal_address_mut(&mut self) -> &mut PostalAddress
pub fn postal_address_mut(&mut self) -> &mut PostalAddress
The post-processed address represented as a postal address.
Sourcepub fn address_components_mut(&mut self) -> &mut Vec<AddressComponent>
pub fn address_components_mut(&mut self) -> &mut Vec<AddressComponent>
Unordered list. The individual address components of the formatted and corrected address, along with validation information. This provides information on the validation status of the individual components.
Address components are not ordered in a particular way. Do not make any assumptions on the ordering of the address components in the list.
Sourcepub fn missing_component_types_mut(&mut self) -> &mut Vec<String>
pub fn missing_component_types_mut(&mut self) -> &mut Vec<String>
The types of components that were expected to be present in a correctly
formatted mailing address but were not found in the input AND could not
be inferred. Components of this type are not present in
formattedAddress, postalAddress, or addressComponents. An example
might be ['street_number', 'route'] for an input like “Boulder,
Colorado, 80301, USA”. The list of possible types can be found
here.
Sourcepub fn unconfirmed_component_types_mut(&mut self) -> &mut Vec<String>
pub fn unconfirmed_component_types_mut(&mut self) -> &mut Vec<String>
The types of the components that are present in the addressComponents
but could not be confirmed to be correct. This field is provided for the
sake of convenience: its contents are equivalent to iterating through
the addressComponents to find the types of all the components where
the
confirmationLevel
is not CONFIRMED
or the inferred flag is not set to true. The list of possible types
can be found here.
Sourcepub fn unresolved_tokens_mut(&mut self) -> &mut Vec<String>
pub fn unresolved_tokens_mut(&mut self) -> &mut Vec<String>
Any tokens in the input that could not be resolved. This might be an
input that was not recognized as a valid part of an address. For
example, for an input such as “Parcel 0000123123 & 0000456456 Str #
Guthrie Center IA 50115 US”, the unresolved tokens might look like
["Parcel", "0000123123", "&", "0000456456"].
Source§impl Address
impl Address
Sourcepub fn set_formatted_address(&mut self, val: String) -> &mut Self
pub fn set_formatted_address(&mut self, val: String) -> &mut Self
The post-processed address, formatted as a single-line address following the address formatting rules of the region where the address is located.
Note: the format of this address may not match the format of the address
in the postalAddress field. For example, the postalAddress always
represents the country as a 2 letter regionCode, such as “US” or “NZ”.
By contrast, this field uses a longer form of the country name, such as
“USA” or “New Zealand”.
Sourcepub fn set_postal_address(&mut self, val: PostalAddress) -> &mut Self
pub fn set_postal_address(&mut self, val: PostalAddress) -> &mut Self
The post-processed address represented as a postal address.
Sourcepub fn set_address_components(
&mut self,
val: Vec<AddressComponent>,
) -> &mut Self
pub fn set_address_components( &mut self, val: Vec<AddressComponent>, ) -> &mut Self
Unordered list. The individual address components of the formatted and corrected address, along with validation information. This provides information on the validation status of the individual components.
Address components are not ordered in a particular way. Do not make any assumptions on the ordering of the address components in the list.
Sourcepub fn set_missing_component_types(&mut self, val: Vec<String>) -> &mut Self
pub fn set_missing_component_types(&mut self, val: Vec<String>) -> &mut Self
The types of components that were expected to be present in a correctly
formatted mailing address but were not found in the input AND could not
be inferred. Components of this type are not present in
formattedAddress, postalAddress, or addressComponents. An example
might be ['street_number', 'route'] for an input like “Boulder,
Colorado, 80301, USA”. The list of possible types can be found
here.
Sourcepub fn set_unconfirmed_component_types(&mut self, val: Vec<String>) -> &mut Self
pub fn set_unconfirmed_component_types(&mut self, val: Vec<String>) -> &mut Self
The types of the components that are present in the addressComponents
but could not be confirmed to be correct. This field is provided for the
sake of convenience: its contents are equivalent to iterating through
the addressComponents to find the types of all the components where
the
confirmationLevel
is not CONFIRMED
or the inferred flag is not set to true. The list of possible types
can be found here.
Sourcepub fn set_unresolved_tokens(&mut self, val: Vec<String>) -> &mut Self
pub fn set_unresolved_tokens(&mut self, val: Vec<String>) -> &mut Self
Any tokens in the input that could not be resolved. This might be an
input that was not recognized as a valid part of an address. For
example, for an input such as “Parcel 0000123123 & 0000456456 Str #
Guthrie Center IA 50115 US”, the unresolved tokens might look like
["Parcel", "0000123123", "&", "0000456456"].
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Address
impl<'de> Deserialize<'de> for Address
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 Ord for Address
impl Ord for Address
Source§impl PartialOrd for Address
impl PartialOrd for Address
impl Eq for Address
impl StructuralPartialEq for Address
Auto Trait Implementations§
impl Freeze for Address
impl RefUnwindSafe for Address
impl Send for Address
impl Sync for Address
impl Unpin for Address
impl UnsafeUnpin for Address
impl UnwindSafe for Address
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.