pub struct Element {
pub distance: Option<DirectionsDistance>,
pub duration: Option<DirectionsDuration>,
pub duration_in_traffic: Option<DirectionsDuration>,
pub fare: Option<TransitFare>,
pub status: ElementStatus,
}Expand description
The information about each origin-destination pairing is returned in an element entry.
Fields§
§distance: Option<DirectionsDistance>The total distance of this route, expressed in meters (value) and as
text. The textual value uses the unit system specified with the unit
parameter of the original request, or the origin’s region.
duration: Option<DirectionsDuration>The length of time it takes to travel this route, expressed in seconds
(the value field) and as text. The textual representation is
localized according to the query’s language parameter.
duration_in_traffic: Option<DirectionsDuration>The length of time it takes to travel this route, based on current and
historical traffic conditions. See the traffic_model request parameter
for the options you can use to request that the returned value is
optimistic, pessimistic, or a best-guess estimate. The duration is
expressed in seconds (the value field) and as text. The textual
representation is localized according to the query’s language parameter.
fare: Option<TransitFare>If present, contains the total fare (that is, the total ticket costs) on this route. This property is only returned for transit requests and only for transit providers where fare information is available.
status: ElementStatusSee Status Codes for a list of possible status codes.