#[non_exhaustive]pub struct VehicleMatch {
pub vehicle: Option<Vehicle>,
pub vehicle_pickup_eta: Option<Timestamp>,
pub vehicle_pickup_distance_meters: Option<Int32Value>,
pub vehicle_pickup_straight_line_distance_meters: Option<Int32Value>,
pub vehicle_dropoff_eta: Option<Timestamp>,
pub vehicle_pickup_to_dropoff_distance_meters: Option<Int32Value>,
pub trip_type: TripType,
pub vehicle_trips_waypoints: Vec<Waypoint>,
pub vehicle_match_type: VehicleMatchType,
pub requested_ordered_by: VehicleMatchOrder,
pub ordered_by: VehicleMatchOrder,
/* private fields */
}Expand description
Contains the vehicle and related estimates for a vehicle that match the
points of active trips for the vehicle SearchVehiclesRequest.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.vehicle: Option<Vehicle>Required. A vehicle that matches the request.
vehicle_pickup_eta: Option<Timestamp>The vehicle’s driving ETA to the pickup point specified in the
request. An empty value indicates a failure in calculating ETA for the
vehicle. If SearchVehiclesRequest.include_back_to_back was true and
this vehicle has an active trip, vehicle_pickup_eta includes the time
required to complete the current active trip.
vehicle_pickup_distance_meters: Option<Int32Value>The distance from the Vehicle’s current location to the pickup point specified in the request, including any intermediate pickup or dropoff points for existing trips. This distance comprises the calculated driving (route) distance, plus the straight line distance between the navigation end point and the requested pickup point. (The distance between the navigation end point and the requested pickup point is typically small.) An empty value indicates an error in calculating the distance.
vehicle_pickup_straight_line_distance_meters: Option<Int32Value>Required. The straight-line distance between the vehicle and the pickup point specified in the request.
vehicle_dropoff_eta: Option<Timestamp>The complete vehicle’s driving ETA to the drop off point specified in the
request. The ETA includes stopping at any waypoints before the
dropoff_point specified in the request. The value will only be populated
when a drop off point is specified in the request. An empty value indicates
an error calculating the ETA.
vehicle_pickup_to_dropoff_distance_meters: Option<Int32Value>The vehicle’s driving distance (in meters) from the pickup point
to the drop off point specified in the request. The distance is only
between the two points and does not include the vehicle location or any
other points that must be visited before the vehicle visits either the
pickup point or dropoff point. The value will only be populated when a
dropoff_point is specified in the request. An empty value indicates
a failure in calculating the distance from the pickup to
drop off point specified in the request.
trip_type: TripTypeRequired. The trip type of the request that was used to calculate the ETA to the pickup point.
vehicle_trips_waypoints: Vec<Waypoint>The ordered list of waypoints used to calculate the ETA. The list includes vehicle location, the pickup points of active trips for the vehicle, and the pickup points provided in the request. An empty list indicates a failure in calculating ETA for the vehicle.
vehicle_match_type: VehicleMatchTypeType of the vehicle match.
requested_ordered_by: VehicleMatchOrderThe order requested for sorting vehicle matches. Equivalent to
ordered_by.
ordered_by: VehicleMatchOrderThe order requested for sorting vehicle matches. Equivalent to
requested_ordered_by.
Implementations§
Source§impl VehicleMatch
impl VehicleMatch
Sourcepub fn set_vehicle<T>(self, v: T) -> Self
pub fn set_vehicle<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_vehicle<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_vehicle<T>(self, v: Option<T>) -> Self
Sourcepub fn set_vehicle_pickup_eta<T>(self, v: T) -> Self
pub fn set_vehicle_pickup_eta<T>(self, v: T) -> Self
Sets the value of vehicle_pickup_eta.
§Example
use wkt::Timestamp;
let x = VehicleMatch::new().set_vehicle_pickup_eta(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_vehicle_pickup_eta<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_vehicle_pickup_eta<T>(self, v: Option<T>) -> Self
Sets or clears the value of vehicle_pickup_eta.
§Example
use wkt::Timestamp;
let x = VehicleMatch::new().set_or_clear_vehicle_pickup_eta(Some(Timestamp::default()/* use setters */));
let x = VehicleMatch::new().set_or_clear_vehicle_pickup_eta(None::<Timestamp>);Sourcepub fn set_vehicle_pickup_distance_meters<T>(self, v: T) -> Selfwhere
T: Into<Int32Value>,
pub fn set_vehicle_pickup_distance_meters<T>(self, v: T) -> Selfwhere
T: Into<Int32Value>,
Sets the value of vehicle_pickup_distance_meters.
§Example
use wkt::Int32Value;
let x = VehicleMatch::new().set_vehicle_pickup_distance_meters(Int32Value::default()/* use setters */);Sourcepub fn set_or_clear_vehicle_pickup_distance_meters<T>(
self,
v: Option<T>,
) -> Selfwhere
T: Into<Int32Value>,
pub fn set_or_clear_vehicle_pickup_distance_meters<T>(
self,
v: Option<T>,
) -> Selfwhere
T: Into<Int32Value>,
Sets or clears the value of vehicle_pickup_distance_meters.
§Example
use wkt::Int32Value;
let x = VehicleMatch::new().set_or_clear_vehicle_pickup_distance_meters(Some(Int32Value::default()/* use setters */));
let x = VehicleMatch::new().set_or_clear_vehicle_pickup_distance_meters(None::<Int32Value>);Sourcepub fn set_vehicle_pickup_straight_line_distance_meters<T>(self, v: T) -> Selfwhere
T: Into<Int32Value>,
pub fn set_vehicle_pickup_straight_line_distance_meters<T>(self, v: T) -> Selfwhere
T: Into<Int32Value>,
Sets the value of vehicle_pickup_straight_line_distance_meters.
§Example
use wkt::Int32Value;
let x = VehicleMatch::new().set_vehicle_pickup_straight_line_distance_meters(Int32Value::default()/* use setters */);Sourcepub fn set_or_clear_vehicle_pickup_straight_line_distance_meters<T>(
self,
v: Option<T>,
) -> Selfwhere
T: Into<Int32Value>,
pub fn set_or_clear_vehicle_pickup_straight_line_distance_meters<T>(
self,
v: Option<T>,
) -> Selfwhere
T: Into<Int32Value>,
Sets or clears the value of vehicle_pickup_straight_line_distance_meters.
§Example
use wkt::Int32Value;
let x = VehicleMatch::new().set_or_clear_vehicle_pickup_straight_line_distance_meters(Some(Int32Value::default()/* use setters */));
let x = VehicleMatch::new().set_or_clear_vehicle_pickup_straight_line_distance_meters(None::<Int32Value>);Sourcepub fn set_vehicle_dropoff_eta<T>(self, v: T) -> Self
pub fn set_vehicle_dropoff_eta<T>(self, v: T) -> Self
Sets the value of vehicle_dropoff_eta.
§Example
use wkt::Timestamp;
let x = VehicleMatch::new().set_vehicle_dropoff_eta(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_vehicle_dropoff_eta<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_vehicle_dropoff_eta<T>(self, v: Option<T>) -> Self
Sets or clears the value of vehicle_dropoff_eta.
§Example
use wkt::Timestamp;
let x = VehicleMatch::new().set_or_clear_vehicle_dropoff_eta(Some(Timestamp::default()/* use setters */));
let x = VehicleMatch::new().set_or_clear_vehicle_dropoff_eta(None::<Timestamp>);Sourcepub fn set_vehicle_pickup_to_dropoff_distance_meters<T>(self, v: T) -> Selfwhere
T: Into<Int32Value>,
pub fn set_vehicle_pickup_to_dropoff_distance_meters<T>(self, v: T) -> Selfwhere
T: Into<Int32Value>,
Sets the value of vehicle_pickup_to_dropoff_distance_meters.
§Example
use wkt::Int32Value;
let x = VehicleMatch::new().set_vehicle_pickup_to_dropoff_distance_meters(Int32Value::default()/* use setters */);Sourcepub fn set_or_clear_vehicle_pickup_to_dropoff_distance_meters<T>(
self,
v: Option<T>,
) -> Selfwhere
T: Into<Int32Value>,
pub fn set_or_clear_vehicle_pickup_to_dropoff_distance_meters<T>(
self,
v: Option<T>,
) -> Selfwhere
T: Into<Int32Value>,
Sets or clears the value of vehicle_pickup_to_dropoff_distance_meters.
§Example
use wkt::Int32Value;
let x = VehicleMatch::new().set_or_clear_vehicle_pickup_to_dropoff_distance_meters(Some(Int32Value::default()/* use setters */));
let x = VehicleMatch::new().set_or_clear_vehicle_pickup_to_dropoff_distance_meters(None::<Int32Value>);Sourcepub fn set_trip_type<T: Into<TripType>>(self, v: T) -> Self
pub fn set_trip_type<T: Into<TripType>>(self, v: T) -> Self
Sourcepub fn set_vehicle_trips_waypoints<T, V>(self, v: T) -> Self
pub fn set_vehicle_trips_waypoints<T, V>(self, v: T) -> Self
Sets the value of vehicle_trips_waypoints.
§Example
use google_maps_fleetengine_v1::model::Waypoint;
let x = VehicleMatch::new()
.set_vehicle_trips_waypoints([
Waypoint::default()/* use setters */,
Waypoint::default()/* use (different) setters */,
]);Sourcepub fn set_vehicle_match_type<T: Into<VehicleMatchType>>(self, v: T) -> Self
pub fn set_vehicle_match_type<T: Into<VehicleMatchType>>(self, v: T) -> Self
Sets the value of vehicle_match_type.
§Example
use google_maps_fleetengine_v1::model::vehicle_match::VehicleMatchType;
let x0 = VehicleMatch::new().set_vehicle_match_type(VehicleMatchType::Exclusive);
let x1 = VehicleMatch::new().set_vehicle_match_type(VehicleMatchType::BackToBack);
let x2 = VehicleMatch::new().set_vehicle_match_type(VehicleMatchType::Carpool);Sourcepub fn set_requested_ordered_by<T: Into<VehicleMatchOrder>>(self, v: T) -> Self
pub fn set_requested_ordered_by<T: Into<VehicleMatchOrder>>(self, v: T) -> Self
Sets the value of requested_ordered_by.
§Example
use google_maps_fleetengine_v1::model::search_vehicles_request::VehicleMatchOrder;
let x0 = VehicleMatch::new().set_requested_ordered_by(VehicleMatchOrder::PickupPointEta);
let x1 = VehicleMatch::new().set_requested_ordered_by(VehicleMatchOrder::PickupPointDistance);
let x2 = VehicleMatch::new().set_requested_ordered_by(VehicleMatchOrder::DropoffPointEta);Sourcepub fn set_ordered_by<T: Into<VehicleMatchOrder>>(self, v: T) -> Self
pub fn set_ordered_by<T: Into<VehicleMatchOrder>>(self, v: T) -> Self
Sets the value of ordered_by.
§Example
use google_maps_fleetengine_v1::model::search_vehicles_request::VehicleMatchOrder;
let x0 = VehicleMatch::new().set_ordered_by(VehicleMatchOrder::PickupPointEta);
let x1 = VehicleMatch::new().set_ordered_by(VehicleMatchOrder::PickupPointDistance);
let x2 = VehicleMatch::new().set_ordered_by(VehicleMatchOrder::DropoffPointEta);Trait Implementations§
Source§impl Clone for VehicleMatch
impl Clone for VehicleMatch
Source§fn clone(&self) -> VehicleMatch
fn clone(&self) -> VehicleMatch
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more