Struct gapi_grpc::google::maps::routes::v1::RouteMatrixElement[][src]

pub struct RouteMatrixElement {
    pub origin_index: i32,
    pub destination_index: i32,
    pub status: Option<Status>,
    pub condition: i32,
    pub distance_meters: i32,
    pub duration: Option<Duration>,
    pub static_duration: Option<Duration>,
    pub travel_advisory: Option<RouteTravelAdvisory>,
    pub fallback_info: Option<FallbackInfo>,
}

Encapsulates route information computed for an origin/destination pair in the ComputeRouteMatrix API. This proto can be streamed to the client.

Fields

origin_index: i32

Zero-based index of the origin in the request.

destination_index: i32

Zero-based index of the destination in the request.

status: Option<Status>

Error status code for this element.

condition: i32

Indicates whether the route was found or not. Independent of status.

distance_meters: i32

The travel distance of the route, in meters.

duration: Option<Duration>

The length of time needed to navigate the route. If you set the route_preference to TRAFFIC_UNAWARE, then this value is the same as static_duration. If you set the route_preference to either TRAFFIC_AWARE or TRAFFIC_AWARE_OPTIMAL, then this value is calculated taking traffic conditions into account.

static_duration: Option<Duration>

The duration of traveling through the route without taking traffic conditions into consideration.

travel_advisory: Option<RouteTravelAdvisory>

Additional information about the route. For example: restriction information and toll information

fallback_info: Option<FallbackInfo>

In some cases when the server is not able to compute the route with the given preferences for this particular origin/destination pair, it may fall back to using a different mode of computation. When fallback mode is used, this field contains detailed information about the fallback response. Otherwise this field is unset.

Implementations

impl RouteMatrixElement[src]

pub fn condition(&self) -> RouteMatrixElementCondition[src]

Returns the enum value of condition, or the default if the field is set to an invalid enum value.

pub fn set_condition(&mut self, value: RouteMatrixElementCondition)[src]

Sets condition to the provided enum value.

Trait Implementations

impl Clone for RouteMatrixElement[src]

impl Debug for RouteMatrixElement[src]

impl Default for RouteMatrixElement[src]

impl Message for RouteMatrixElement[src]

impl PartialEq<RouteMatrixElement> for RouteMatrixElement[src]

impl StructuralPartialEq for RouteMatrixElement[src]

Auto Trait Implementations

impl RefUnwindSafe for RouteMatrixElement

impl Send for RouteMatrixElement

impl Sync for RouteMatrixElement

impl Unpin for RouteMatrixElement

impl UnwindSafe for RouteMatrixElement

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IntoRequest<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]

impl<T> WithSubscriber for T[src]