Struct map_model::pathfind::v2::PathV2 [−][src]
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]
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 Clone for PathV2
[src]
impl Debug 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>,
impl Serialize for PathV2
[src]
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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> 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> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,