pub struct RouteLeg {
pub distance_meters: i32,
pub duration: Option<Duration>,
pub static_duration: Option<Duration>,
pub polyline: Option<Polyline>,
pub start_location: Option<Location>,
pub end_location: Option<Location>,
pub steps: Vec<RouteLegStep>,
pub travel_advisory: Option<RouteLegTravelAdvisory>,
pub localized_values: Option<RouteLegLocalizedValues>,
pub steps_overview: Option<StepsOverview>,
}
Expand description
Contains a segment between non-via
waypoints.
Fields§
§distance_meters: i32
The travel distance of the route leg, in meters.
duration: Option<Duration>
The length of time needed to navigate the leg. If the route_preference
is set to TRAFFIC_UNAWARE
, then this value is the same as
static_duration
. If the route_preference
is either TRAFFIC_AWARE
or
TRAFFIC_AWARE_OPTIMAL
, then this value is calculated taking traffic
conditions into account.
static_duration: Option<Duration>
The duration of travel through the leg, calculated without taking traffic conditions into consideration.
polyline: Option<Polyline>
The overall polyline for this leg that includes each step
’s
polyline.
start_location: Option<Location>
The start location of this leg. This location might be different from the
provided origin
. For example, when the provided origin
is not near a
road, this is a point on the road.
end_location: Option<Location>
The end location of this leg. This location might be different from the
provided destination
. For example, when the provided destination
is not
near a road, this is a point on the road.
steps: Vec<RouteLegStep>
An array of steps denoting segments within this leg. Each step represents one navigation instruction.
travel_advisory: Option<RouteLegTravelAdvisory>
Contains the additional information that the user should be informed about, such as possible traffic zone restrictions, on a route leg.
localized_values: Option<RouteLegLocalizedValues>
Text representations of properties of the RouteLeg
.
steps_overview: Option<StepsOverview>
Overview information about the steps in this RouteLeg
. This field is only
populated for TRANSIT routes.
Trait Implementations§
Source§impl Message for RouteLeg
impl Message for RouteLeg
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 RouteLeg
Auto Trait Implementations§
impl Freeze for RouteLeg
impl RefUnwindSafe for RouteLeg
impl Send for RouteLeg
impl Sync for RouteLeg
impl Unpin for RouteLeg
impl UnwindSafe for RouteLeg
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