Enum google_maps::directions::request::waypoint::Waypoint
source · pub enum Waypoint {
Address(String),
LatLng(LatLng),
PlaceId(String),
Polyline(String),
}
Expand description
Used to specify pass throughs or stopovers at intermediate locations.
Variants§
Address(String)
If you pass an address, the Directions service geocodes the string and converts it to latitude & longitude coordinates to calculate directions. This coordinate may be different from that returned by the Geocoding API, for example a building entrance rather than its center.
LatLng(LatLng)
If you pass coordinates, they are used unchanged to calculate directions.
PlaceId(String)
The place ID may only be specified if the request includes an API key or a Google Maps Platform Premium Plan client ID. You can retrieve place IDs from the Geocoding API and the Places API (including Place Autocomplete). For an example using place IDs from Place Autocomplete, see Place Autocomplete and Directions. For more about place IDs, see the Place ID overview.
Polyline(String)
Alternatively, you can supply an encoded set of points using the Encoded Polyline Algorithm. You will find an encoded set is useful for a large number of waypoints, because the URL is significantly shorter. All web services have a URL limit of 8192 characters.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Waypoint
impl<'de> Deserialize<'de> for Waypoint
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 Waypoint
impl Ord for Waypoint
source§impl PartialEq for Waypoint
impl PartialEq for Waypoint
source§impl PartialOrd for Waypoint
impl PartialOrd for Waypoint
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 moreimpl Eq for Waypoint
impl StructuralPartialEq for Waypoint
Auto Trait Implementations§
impl RefUnwindSafe for Waypoint
impl Send for Waypoint
impl Sync for Waypoint
impl Unpin for Waypoint
impl UnwindSafe for Waypoint
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.