pub fn astar<N, FH, FN, I>(
start: N,
goal: N,
heuristic: FH,
neighbors: FN,
) -> Option<AStarResult<N>>Expand description
Generic A* pathfinding.
start: starting nodegoal: target nodeheuristic: estimates cost from a node to the goal (must be admissible)neighbors: returns neighbors and the edge cost to reach each
Returns Some(AStarResult) with the shortest path and total cost,
or None if no path exists.