pub trait ShortestPath<W> {
// Required method
fn shortest_path<I, OPT: ShortestPathOptions>(
&self,
origin_cell: H3Cell,
destination_cells: I,
options: &OPT,
) -> Result<Vec<Path<W>>, Error>
where I: IntoIterator,
I::Item: Borrow<H3Cell>;
}
Expand description
Implements a simple Dijkstra shortest path route finding.
While this is not the most efficient routing algorithm, it has the benefit of finding the nearest destinations first. So it can be used to answer questions like “which are the N nearest destinations” using a large amount of possible destinations.
Required Methods§
fn shortest_path<I, OPT: ShortestPathOptions>( &self, origin_cell: H3Cell, destination_cells: I, options: &OPT, ) -> Result<Vec<Path<W>>, Error>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.