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
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
.
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’ travel modes, and when the ‘location_type’ is set to ‘location’.
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
.source§impl PartialEq for Waypoint
impl PartialEq for Waypoint
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
§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