Skip to main content

Module router

Module router 

Source
Expand description

Mode-tagged routing graph and Dijkstra router.

This is a small multi-modal shortest-path engine. Nodes are opaque u64 identifiers; edges carry a traversal cost and an rustsim_modes::AllowedModes permission mask. The router only relaxes edges whose permission mask intersects the traveller’s available mode set.

Structs§

ModalEdge
A directed, mode-tagged edge.
ModalGraph
Mode-tagged routing graph.
ModalRoute
Resulting route from shortest_path.

Enums§

ModalGraphBuildError
Errors returned when building a modal graph from transport link metadata.

Functions§

only
Permission helper for single-mode callers.
shortest_path
Compute the lowest-cost path from start to goal using only edges that permit at least one mode in available_modes. Returns None if unreachable.

Type Aliases§

NodeId
Opaque node identifier in the routing graph.