Struct map_model::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: PathRequesttotal_length: Distancecrossed_so_far: Distanceuber_turns: VecDeque<UberTurn>currently_inside_ut: Option<UberTurn>blocked_starts: Vec<LaneID>

Implementations

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.