Enum google_api_proto::google::maps::regionlookup::v1alpha::region_identifier::Location
source · pub enum Location {
Place(String),
UnitCode(String),
}
Expand description
The location must be specified by one of the following:
Variants§
Place(String)
The name of the region to match to a Place ID.
The place field is used in combination with place_type to look up the region Place ID.
For example: If place_type is “locality”, a valid place can be “Palo Alto, CA”.
If place_type is “postal_code”, a valid place can be “94109”.
If place_type is “country”, a valid place can be “United States”. etc.
region_code is required when place is specified except when place_type is “country”.
UnitCode(String)
The FIPs state or county codes (US only) or ISO-3166-1 country code to be matched.
The unit_code field is used in combination with place_type to look up the region Place ID.
For example: If place_type is “country”, a valid unit_code can be “US” (ISO-3166-1 Alpha-2 code for United States) or “BR” (ISO-3166-1 Alpha-2 code for Brazil).
If place_type is “administrative_area_level_1” (state) and region_code is “US”, a valid unit_code can be “6” (FIPs code for California) or “12”(FIPs code for Florida).
If place_type is “administrative_area_level_2” (county) and region_code is “US”, a valid unit_code can be “6001” (FIPs code for Alameda County in California) or “12086” (FIPs code for Miami-Dade County in Florida).
region_code is required when specifying a FIPs code. region_code is ignored for ISO-3166-1 country codes.
Implementations§
source§impl Location
impl Location
sourcepub fn merge(
field: &mut Option<Location>,
tag: u32,
wire_type: WireType,
buf: &mut impl Buf,
ctx: DecodeContext,
) -> Result<(), DecodeError>
pub fn merge( field: &mut Option<Location>, tag: u32, wire_type: WireType, buf: &mut impl Buf, ctx: DecodeContext, ) -> Result<(), DecodeError>
Decodes an instance of the message from a buffer, and merges it into self.
sourcepub fn encoded_len(&self) -> usize
pub fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
Trait Implementations§
source§impl PartialEq for Location
impl PartialEq for Location
impl StructuralPartialEq for Location
Auto Trait Implementations§
impl Freeze for Location
impl RefUnwindSafe for Location
impl Send for Location
impl Sync for Location
impl Unpin for Location
impl UnwindSafe for Location
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