Struct map_model::pathfind::v1::Path [−][src]
pub struct Path { steps: VecDeque<PathStep>, orig_req: PathRequest, total_length: Distance, crossed_so_far: Distance, uber_turns: VecDeque<UberTurn>, currently_inside_ut: Option<UberTurn>, blocked_starts: Vec<LaneID>, }
Fields
steps: VecDeque<PathStep>
orig_req: PathRequest
total_length: Distance
crossed_so_far: Distance
uber_turns: VecDeque<UberTurn>
currently_inside_ut: Option<UberTurn>
blocked_starts: Vec<LaneID>
Implementations
pub(crate) fn new(
map: &Map,
steps: Vec<PathStep>,
orig_req: PathRequest,
uber_turns: Vec<UberTurn>,
blocked_starts: Vec<LaneID>
) -> Path
Once we finish this PathStep, how much distance will be crossed? If the step is at the beginning or end of our path, then the full length may not be used.
The original PathRequest used to produce this path. If the path has been modified since creation, the start and end of the request won’t match up with the current path steps.
Trusting the caller to do this in valid ways.
Traces along the path from its originally requested start. This is only valid to call for an umodified path.
It mostly seems the PolyLine’s length will match total_length
, but callers beware if
you’re relying on this – check walking paths with the buggy sharp angles particularly.
Traces along the path from a specified distance along the first step until the end.
Estimate how long following the path will take in the best case, assuming no traffic or delay at intersections. To determine the speed along each step, the agent’s optional max_speed must be known.
If the agent following this path will initially block some intermediate lanes as they move
between a driveway and get_req().start
, then record them here.
Returns the total elevation (gain, loss) experienced over the path.
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for Path
impl UnwindSafe for Path
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
type Output = T
type Output = T
Should always be Self