pub struct Manifest { /* private fields */ }Expand description
Matrix request
Implementations§
Source§impl Manifest
impl Manifest
Sourcepub fn sources_to_targets(
self,
sources: impl IntoIterator<Item = Location>,
targets: impl IntoIterator<Item = Location>,
) -> Self
pub fn sources_to_targets( self, sources: impl IntoIterator<Item = Location>, targets: impl IntoIterator<Item = Location>, ) -> Self
Sets the source and targets of the matrix
Sourcepub fn costing(self, costing: Costing) -> Self
pub fn costing(self, costing: Costing) -> Self
Configures the costing model
Valhalla’s routing service uses dynamic, run-time costing to generate the route path. Can be configured with different settings depending on the costing model used.
Note: multimodal costing is not supported for the time-distance matrix service at this time.
Default: costing::Costing::Auto
Sourcepub fn id(self, id: impl ToString) -> Self
pub fn id(self, id: impl ToString) -> Self
Name your route request.
If id is specified, the naming will be sent through to the response.
Sourcepub fn minimum_matrix_locations_count(self, count: u32) -> Self
pub fn minimum_matrix_locations_count(self, count: u32) -> Self
Sets the minimum number of locations that need to be found satisfying the request
Allows a partial result to be returned.
This is basically equivalent to:
“find the closest or best N locations out of the full location set”
Sourcepub fn date_time(self, date_time: DateTime) -> Self
pub fn date_time(self, date_time: DateTime) -> Self
Shortcut for configuring the arrival/departure date_time settings globally instead of specifying it for each source/target.
See Location::date_time if you want a more granular API.
Valhalla will translate this to setting the value on all source locations when
DateTime::from_current_departure_time or DateTime::from_departure_time is used and
on all target locations when DateTime::from_arrival_time.
Note: There are important limitations to time awareness. Due to algorithmic complexity, we disallow time-dependence for certain combinations of date_time on locations:
- when there are more sources than
targets:Location::date_timeon anysource- using
Self::date_timewithDateTime::from_current_departure_timeandDateTime::from_departure_time
- when there’s more or equal amount of
targets than/assourcesLocation::date_timeon anytargetDateTime::from_arrival_time
Sourcepub fn verbose_output(self, verbose: bool) -> Self
pub fn verbose_output(self, verbose: bool) -> Self
Modifies the verbosity of the output:
truewill output a flat list of objects for distances & durations explicitly specifying thesource&targetindices.falsewill return more compact, nested row-major distances & durations arrays and not echosourcesandtargets
Default: true
Sourcepub fn shape_format(self, shape_format: ShapeFormat) -> Self
pub fn shape_format(self, shape_format: ShapeFormat) -> Self
Specifies the ShapeFormat for the path shape of each connection.