Skip to main content

path

Function path 

Source
pub fn path(store: &Store, from: &str, to: &str) -> Result<Path, StoreError>
Expand description

Find a shortest path from from to to, following edges in either direction. Returns a Path with found = false (and no hops) if either endpoint is absent or to is unreachable; from == to yields the trivial zero-length path.

The search is breadth-first with deterministic neighbour ordering, so the returned path is stable for a given graph.

ยงErrors

Returns StoreError on query failure.