pub struct Waypoint {
pub via: bool,
pub vehicle_stopover: bool,
pub side_of_road: bool,
pub location_type: Option<LocationType>,
}
Expand description
Encapsulates a waypoint. Waypoints mark both the beginning and end of a route, and include intermediate stops along the route.
Fields§
§via: bool
Marks this waypoint as a milestone rather a stopping point. For
each non-via waypoint in the request, the response appends an entry to the
[legs
][google.maps.routing.v2.Route.legs]
array to provide the details for stopovers on that leg of the trip. Set
this value to true when you want the route to pass through this waypoint
without stopping over. Via waypoints don’t cause an entry to be added to
the legs
array, but they do route the journey through the waypoint. You
can only set this value on waypoints that are intermediates. The request
fails if you set this field on terminal waypoints. If
ComputeRoutesRequest.optimize_waypoint_order
is set to true then this
field cannot be set to true; otherwise, the request fails.
vehicle_stopover: bool
Indicates that the waypoint is meant for vehicles to stop at, where the
intention is to either pickup or drop-off. When you set this value, the
calculated route won’t include non-via
waypoints on roads that are
unsuitable for pickup and drop-off. This option works only for DRIVE
and
TWO_WHEELER
travel modes, and when the location_type
is
[Location
][google.maps.routing.v2.Location].
side_of_road: bool
Indicates that the location of this waypoint is meant to have a preference
for the vehicle to stop at a particular side of road. When you set this
value, the route will pass through the location so that the vehicle can
stop at the side of road that the location is biased towards from the
center of the road. This option works only for DRIVE
and TWO_WHEELER
[RouteTravelMode
][google.maps.routing.v2.RouteTravelMode].
location_type: Option<LocationType>
Different ways to represent a location.
Trait Implementations§
Source§impl Message for Waypoint
impl Message for Waypoint
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
.impl StructuralPartialEq for Waypoint
Auto Trait Implementations§
impl Freeze for Waypoint
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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