#[non_exhaustive]pub struct Waypoint {
pub side_of_road: bool,
pub location_type: Option<LocationType>,
/* private fields */
}Expand description
Encapsulates a waypoint. Waypoints mark arrival and departure locations of VisitRequests, and start and end locations of Vehicles.
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.side_of_road: boolIndicates 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 the ‘DRIVING’ travel mode, and when the ‘location_type’ is set to ‘location’.
location_type: Option<LocationType>Different ways to represent a location.
Implementations§
Source§impl Waypoint
impl Waypoint
pub fn new() -> Self
Sourcepub fn set_side_of_road<T: Into<bool>>(self, v: T) -> Self
pub fn set_side_of_road<T: Into<bool>>(self, v: T) -> Self
Sets the value of side_of_road.
Sourcepub fn set_location_type<T: Into<Option<LocationType>>>(self, v: T) -> Self
pub fn set_location_type<T: Into<Option<LocationType>>>(self, v: T) -> Self
Sets the value of location_type.
Note that all the setters affecting location_type are mutually
exclusive.
Sourcepub fn location(&self) -> Option<&Box<Location>>
pub fn location(&self) -> Option<&Box<Location>>
The value of location_type
if it holds a Location, None if the field is not set or
holds a different branch.
Sourcepub fn set_location<T: Into<Box<Location>>>(self, v: T) -> Self
pub fn set_location<T: Into<Box<Location>>>(self, v: T) -> Self
Sets the value of location_type
to hold a Location.
Note that all the setters affecting location_type are
mutually exclusive.
Sourcepub fn place_id(&self) -> Option<&String>
pub fn place_id(&self) -> Option<&String>
The value of location_type
if it holds a PlaceId, None if the field is not set or
holds a different branch.
Sourcepub fn set_place_id<T: Into<String>>(self, v: T) -> Self
pub fn set_place_id<T: Into<String>>(self, v: T) -> Self
Sets the value of location_type
to hold a PlaceId.
Note that all the setters affecting location_type are
mutually exclusive.