[][src]Struct map_model::Path

pub struct Path {
    steps: VecDeque<PathStep>,
    end_dist: Distance,
    total_length: Distance,
    crossed_so_far: Distance,
    total_lanes: usize,
    uber_turns: VecDeque<UberTurn>,
    currently_inside_ut: Option<UberTurn>,
}

Fields

steps: VecDeque<PathStep>end_dist: Distancetotal_length: Distancecrossed_so_far: Distancetotal_lanes: usizeuber_turns: VecDeque<UberTurn>currently_inside_ut: Option<UberTurn>

Implementations

impl Path[src]

pub(crate) fn new(
    map: &Map,
    steps: Vec<PathStep>,
    end_dist: Distance,
    uber_turns: Vec<UberTurn>
) -> Path
[src]

pub fn one_step(l: LaneID, map: &Map) -> Path[src]

pub fn dummy() -> Path[src]

Only used for weird serialization magic.

pub fn total_lanes(&self) -> usize[src]

pub fn lanes_crossed_so_far(&self) -> usize[src]

pub fn crossed_so_far(&self) -> Distance[src]

pub fn total_length(&self) -> Distance[src]

pub fn percent_dist_crossed(&self) -> f64[src]

pub fn is_empty(&self) -> bool[src]

pub fn is_last_step(&self) -> bool[src]

pub fn isnt_last_step(&self) -> bool[src]

pub fn currently_inside_ut(&self) -> &Option<UberTurn>[src]

pub fn about_to_start_ut(&self) -> Option<&UberTurn>[src]

pub fn shift(&mut self, map: &Map) -> PathStep[src]

pub fn add(&mut self, step: PathStep, map: &Map)[src]

pub fn approaching_uber_turn(&self) -> bool[src]

pub fn modify_step(&mut self, idx: usize, step: PathStep, map: &Map)[src]

Trusting the caller to do this in valid ways.

pub fn current_step(&self) -> PathStep[src]

pub fn next_step(&self) -> PathStep[src]

pub fn maybe_next_step(&self) -> Option<PathStep>[src]

pub fn last_step(&self) -> PathStep[src]

pub fn trace(
    &self,
    map: &Map,
    start_dist: Distance,
    dist_ahead: Option<Distance>
) -> Option<PolyLine>
[src]

dist_ahead is unlimited when None.

pub fn get_steps(&self) -> &VecDeque<PathStep>[src]

fn append(&mut self, other: Path, map: &Map)[src]

Trait Implementations

impl Clone for Path[src]

impl Debug for Path[src]

impl<'de> Deserialize<'de> for Path[src]

impl PartialEq<Path> for Path[src]

impl Serialize for Path[src]

impl StructuralPartialEq for Path[src]

Auto Trait Implementations

impl RefUnwindSafe for Path

impl Send for Path

impl Sync for Path

impl Unpin for Path

impl UnwindSafe for Path

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,