#[repr(u8)]pub enum AutocompleteType {
Geocode = 0,
Address = 1,
Establishment = 2,
Regions = 3,
Cities = 4,
}
Expand description
You may restrict results from a Place Autocomplete request to be of a certain type by passing a types parameter. The parameter specifies a type or a type collection, as listed in the supported types below. If nothing is specified, all types are returned. In general only a single type is allowed. The exception is that you can safely mix the geocode and establishment types, but note that this will have the same effect as specifying no types.
Variants§
Geocode = 0
Instructs the Place Autocomplete service to return only geocoding results, rather than business results. Generally, you use this request to disambiguate results where the location specified may be indeterminate.
Address = 1
Instructs the Place Autocomplete service to return only geocoding results with a precise address. Generally, you use this request when you know the user will be looking for a fully specified address. indeterminate.
Establishment = 2
Instructs the Place Autocomplete service to return only business results.
Regions = 3
Type collection instructs the Places service to return any result matching the following types:
locality
sublocality
postal_code
country
administrative_area_level_1
administrative_area_level_2
Cities = 4
Type collection instructs the Places service to return results that
match locality
or administrative_area_level_3
.
Implementations§
Trait Implementations§
source§impl Clone for AutocompleteType
impl Clone for AutocompleteType
source§fn clone(&self) -> AutocompleteType
fn clone(&self) -> AutocompleteType
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for AutocompleteType
impl Debug for AutocompleteType
source§impl Default for AutocompleteType
impl Default for AutocompleteType
source§fn default() -> AutocompleteType
fn default() -> AutocompleteType
source§impl<'de> Deserialize<'de> for AutocompleteType
impl<'de> Deserialize<'de> for AutocompleteType
source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Manual implementation of Deserialize
for serde
. This will take
advantage of the phf
-powered TryFrom
implementation for this type.
source§impl Display for AutocompleteType
impl Display for AutocompleteType
source§impl From<&AutocompleteType> for &str
impl From<&AutocompleteType> for &str
source§fn from(autocomplete_type: &AutocompleteType) -> Self
fn from(autocomplete_type: &AutocompleteType) -> Self
Converts a AutocompleteType
enum to a String
that contains a
autocomplete
type
code.
source§impl From<&AutocompleteType> for AutocompleteType
impl From<&AutocompleteType> for AutocompleteType
source§impl From<&AutocompleteType> for String
impl From<&AutocompleteType> for String
source§fn from(autocomplete_type: &AutocompleteType) -> Self
fn from(autocomplete_type: &AutocompleteType) -> Self
Converts a AutocompleteType
enum to a String
that contains a
autocomplete
type
code.
source§impl FromStr for AutocompleteType
impl FromStr for AutocompleteType
source§impl Hash for AutocompleteType
impl Hash for AutocompleteType
source§impl Ord for AutocompleteType
impl Ord for AutocompleteType
source§fn cmp(&self, other: &AutocompleteType) -> Ordering
fn cmp(&self, other: &AutocompleteType) -> 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 AutocompleteType
impl PartialEq for AutocompleteType
source§fn eq(&self, other: &AutocompleteType) -> bool
fn eq(&self, other: &AutocompleteType) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for AutocompleteType
impl PartialOrd for AutocompleteType
source§fn partial_cmp(&self, other: &AutocompleteType) -> Option<Ordering>
fn partial_cmp(&self, other: &AutocompleteType) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more