Struct map_model::pathfind::v2::PathV2 [−][src]
pub struct PathV2 { steps: Vec<PathStepV2>, req: PathRequest, cost: Duration, uber_turns: Vec<UberTurnV2>, }
A path between two endpoints for a particular mode. This representation is immutable and doesn’t prescribe specific lanes and turns to follow.
Fields
steps: Vec<PathStepV2>
req: PathRequest
cost: Duration
uber_turns: Vec<UberTurnV2>
Implementations
impl PathV2
[src]
impl PathV2
[src]pub(crate) fn new(
steps: Vec<PathStepV2>,
req: PathRequest,
cost: Duration,
uber_turns: Vec<UberTurnV2>
) -> PathV2
[src]
steps: Vec<PathStepV2>,
req: PathRequest,
cost: Duration,
uber_turns: Vec<UberTurnV2>
) -> PathV2
pub(crate) fn from_roads(
roads: Vec<DirectedRoadID>,
req: PathRequest,
cost: Duration,
uber_turns: Vec<UberTurnV2>,
map: &Map
) -> PathV2
[src]
roads: Vec<DirectedRoadID>,
req: PathRequest,
cost: Duration,
uber_turns: Vec<UberTurnV2>,
map: &Map
) -> PathV2
Vehicle implementations often just calculate the sequence of roads. Turn that into PathStepV2 here.
pub fn get_req(&self) -> &PathRequest
[src]
The original PathRequest used to produce this path.
pub fn get_steps(&self) -> &Vec<PathStepV2>
[src]
All steps in this path.
pub fn get_cost(&self) -> Duration
[src]
The time needed to perform this path. This time is not a lower bound; physically following the path might be faster. This time incorporates costs like using sub-optimal lanes or taking difficult turns.
pub fn into_v1(self, map: &Map) -> Result<Path>
[src]
Transform a sequence of roads representing a path into the current lane-based path, by picking particular lanes and turns to use.
fn into_v1_walking(self, map: &Map) -> Result<Path>
[src]
Trait Implementations
impl<'de> Deserialize<'de> for PathV2
[src]
impl<'de> Deserialize<'de> for PathV2
[src]fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
impl RefUnwindSafe for PathV2
impl Send for PathV2
impl Sync for PathV2
impl Unpin for PathV2
impl UnwindSafe for PathV2
Blanket Implementations
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
pub fn vzip(self) -> V
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,