pub enum AutocompleteType {
Geocode,
Address,
Establishment,
Regions,
Cities,
}
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
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
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
Instructs the Place Autocomplete service to return only business results.
Regions
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
Type collection instructs the Places service to return results that
match locality
or administrative_area_level_3
.
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§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 String
impl From<&AutocompleteType> for String
source§fn from(autocomplete_type: &AutocompleteType) -> String
fn from(autocomplete_type: &AutocompleteType) -> String
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<AutocompleteType> for AutocompleteType
impl PartialEq<AutocompleteType> 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<AutocompleteType> for AutocompleteType
impl PartialOrd<AutocompleteType> 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 moresource§impl Serialize for AutocompleteType
impl Serialize for AutocompleteType
source§impl TryFrom<&str> for AutocompleteType
impl TryFrom<&str> for AutocompleteType
impl Eq for AutocompleteType
impl StructuralEq for AutocompleteType
impl StructuralPartialEq for AutocompleteType
Auto Trait Implementations§
impl RefUnwindSafe for AutocompleteType
impl Send for AutocompleteType
impl Sync for AutocompleteType
impl Unpin for AutocompleteType
impl UnwindSafe for AutocompleteType
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.