Struct google_api_proto::google::maps::addressvalidation::v1::AddressComponent
source · pub struct AddressComponent {
pub component_name: Option<ComponentName>,
pub component_type: String,
pub confirmation_level: i32,
pub inferred: bool,
pub spell_corrected: bool,
pub replaced: bool,
pub unexpected: bool,
}
Expand description
Represents an address component, such as a street, city, or state.
Fields§
§component_name: Option<ComponentName>
The name for this component.
component_type: String
The type of the address component. See Table 2: Additional types returned by the Places service for a list of possible types.
confirmation_level: i32
Indicates the level of certainty that we have that the component is correct.
inferred: bool
Indicates that the component was not part of the input, but we inferred it for the address location and believe it should be provided for a complete address.
spell_corrected: bool
Indicates a correction to a misspelling in the component name. The API does not always flag changes from one spelling variant to another, such as when changing “centre” to “center”. It also does not always flag common misspellings, such as when changing “Amphitheater Pkwy” to “Amphitheatre Pkwy”.
replaced: bool
Indicates the name of the component was replaced with a completely different one, for example a wrong postal code being replaced with one that is correct for the address. This is not a cosmetic change, the input component has been changed to a different one.
unexpected: bool
Indicates an address component that is not expected to be present in a postal address for the given region. We have retained it only because it was part of the input.
Implementations§
source§impl AddressComponent
impl AddressComponent
sourcepub fn confirmation_level(&self) -> ConfirmationLevel
pub fn confirmation_level(&self) -> ConfirmationLevel
Returns the enum value of confirmation_level
, or the default if the field is set to an invalid enum value.
sourcepub fn set_confirmation_level(&mut self, value: ConfirmationLevel)
pub fn set_confirmation_level(&mut self, value: ConfirmationLevel)
Sets confirmation_level
to the provided enum value.
Trait Implementations§
source§impl Clone for AddressComponent
impl Clone for AddressComponent
source§fn clone(&self) -> AddressComponent
fn clone(&self) -> AddressComponent
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for AddressComponent
impl Debug for AddressComponent
source§impl Default for AddressComponent
impl Default for AddressComponent
source§impl Message for AddressComponent
impl Message for AddressComponent
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for AddressComponent
impl PartialEq for AddressComponent
source§fn eq(&self, other: &AddressComponent) -> bool
fn eq(&self, other: &AddressComponent) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for AddressComponent
Auto Trait Implementations§
impl Freeze for AddressComponent
impl RefUnwindSafe for AddressComponent
impl Send for AddressComponent
impl Sync for AddressComponent
impl Unpin for AddressComponent
impl UnwindSafe for AddressComponent
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request