pub struct TripRequestBuilder { /* private fields */ }
Expand description
Builder for TripRequest
.
Implementations§
Source§impl TripRequestBuilder
impl TripRequestBuilder
Sourcepub fn profile(&mut self, value: TransportationMode) -> &mut Self
pub fn profile(&mut self, value: TransportationMode) -> &mut Self
Mode of transportation
Sourcepub fn coordinates(&mut self, value: Coordinates) -> &mut Self
pub fn coordinates(&mut self, value: Coordinates) -> &mut Self
Coordinates the request bears on
Sourcepub fn bearings<VALUE: Into<Vec<BearingRequest>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn bearings<VALUE: Into<Vec<BearingRequest>>>( &mut self, value: VALUE, ) -> &mut Self
Limits the search to segments with given bearing in degrees towards true north in clockwise direction.
Sourcepub fn radiuses<VALUE: Into<Vec<Radius>>>(&mut self, value: VALUE) -> &mut Self
pub fn radiuses<VALUE: Into<Vec<Radius>>>(&mut self, value: VALUE) -> &mut Self
Limits the search to given radius in meters.
Sourcepub fn generate_hints(&mut self, value: bool) -> &mut Self
pub fn generate_hints(&mut self, value: bool) -> &mut Self
Adds a Hint to the response which can be used in subsequent requests, see hints parameter.
Sourcepub fn hints<VALUE: Into<Vec<Hint>>>(&mut self, value: VALUE) -> &mut Self
pub fn hints<VALUE: Into<Vec<Hint>>>(&mut self, value: VALUE) -> &mut Self
Hint from previous request to derive position in street network.
Sourcepub fn approaches<VALUE: Into<Vec<Approach>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn approaches<VALUE: Into<Vec<Approach>>>( &mut self, value: VALUE, ) -> &mut Self
Keep waypoints on curb side.
Sourcepub fn exclude<VALUE: Into<Vec<String>>>(&mut self, value: VALUE) -> &mut Self
pub fn exclude<VALUE: Into<Vec<String>>>(&mut self, value: VALUE) -> &mut Self
Additive list of classes to avoid, order does not matter
Sourcepub fn snapping<VALUE: Into<Snapping>>(&mut self, value: VALUE) -> &mut Self
pub fn snapping<VALUE: Into<Snapping>>(&mut self, value: VALUE) -> &mut Self
Default snapping avoids is_startpoint (see profile) edges, any will snap to any edge in the graph
Sourcepub fn skip_waypoints(&mut self, value: bool) -> &mut Self
pub fn skip_waypoints(&mut self, value: bool) -> &mut Self
Removes waypoints from the response. Waypoints are still calculated, but not serialized. Could be useful in case you are interested in some other part of response and do not want to transfer waste data.
Sourcepub fn roundtrip(&mut self, value: bool) -> &mut Self
pub fn roundtrip(&mut self, value: bool) -> &mut Self
Returned route is a roundtrip (route returns to first location)
Sourcepub fn source(&mut self, value: Option<Source>) -> &mut Self
pub fn source(&mut self, value: Option<Source>) -> &mut Self
Returned route starts at any or first coordinate (by default, any)
Sourcepub fn destination(&mut self, value: Option<Destination>) -> &mut Self
pub fn destination(&mut self, value: Option<Destination>) -> &mut Self
Returned route ends at any or last coordinate (by default, any)
Sourcepub fn geometries<VALUE: Into<Option<Geometries>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn geometries<VALUE: Into<Option<Geometries>>>( &mut self, value: VALUE, ) -> &mut Self
Returned route geometry format (influences overview and per step)
Sourcepub fn annotations<VALUE: Into<Option<RouteAnnotationRequest>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn annotations<VALUE: Into<Option<RouteAnnotationRequest>>>( &mut self, value: VALUE, ) -> &mut Self
Returns additional metadata for each coordinate along the route geometry.
Sourcepub fn overview<VALUE: Into<Option<OverviewRequest>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn overview<VALUE: Into<Option<OverviewRequest>>>( &mut self, value: VALUE, ) -> &mut Self
Add overview geometry either full, simplified according to highest zoom level it could be display on, or not at all.
Sourcepub fn build(&self) -> Result<TripRequest, TripRequestBuilderError>
pub fn build(&self) -> Result<TripRequest, TripRequestBuilderError>
Trait Implementations§
Source§impl Clone for TripRequestBuilder
impl Clone for TripRequestBuilder
Source§fn clone(&self) -> TripRequestBuilder
fn clone(&self) -> TripRequestBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more