[][src]Struct sim::router::Router

pub(crate) struct Router {
    path: Path,
    goal: Goal,
    owner: CarID,
}

Fields

path: Path

Front is always the current step

goal: Goalowner: CarID

Implementations

impl Router[src]

pub fn end_at_border(
    owner: CarID,
    path: Path,
    end_dist: Distance,
    i: IntersectionID
) -> Router
[src]

pub fn vanish_bus(owner: CarID, start: Position, map: &Map) -> Router[src]

pub fn park_near(owner: CarID, path: Path, bldg: BuildingID) -> Router[src]

pub fn bike_then_stop(owner: CarID, path: Path, goal: SidewalkSpot) -> Router[src]

pub fn follow_bus_route(owner: CarID, path: Path) -> Router[src]

pub fn head(&self) -> Traversable[src]

pub fn next(&self) -> Traversable[src]

pub fn maybe_next(&self) -> Option<Traversable>[src]

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

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

pub fn get_path(&self) -> &Path[src]

pub fn advance(
    &mut self,
    vehicle: &Vehicle,
    parking: &ParkingSimState,
    map: &Map,
    trip_and_person: Option<(TripID, PersonID)>,
    events: &mut Vec<Event>
) -> Traversable
[src]

Returns the step just finished

pub fn maybe_handle_end(
    &mut self,
    front: Distance,
    vehicle: &Vehicle,
    parking: &ParkingSimState,
    map: &Map,
    trip_and_person: Option<(TripID, PersonID)>,
    events: &mut Vec<Event>
) -> Option<ActionAtEnd>
[src]

Called when the car is Queued at the last step, or when they initially advance to the last step.

pub fn opportunistically_lanechange(
    &mut self,
    queues: &HashMap<Traversable, Queue>,
    map: &Map,
    handle_uber_turns: bool
)
[src]

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

pub fn get_parking_spot_goal(&self) -> Option<&ParkingSpot>[src]

Trait Implementations

impl Clone for Router[src]

impl Debug for Router[src]

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

impl PartialEq<Router> for Router[src]

impl Serialize for Router[src]

impl StructuralPartialEq for Router[src]

Auto Trait Implementations

impl RefUnwindSafe for Router[src]

impl Send for Router[src]

impl Sync for Router[src]

impl Unpin for Router[src]

impl UnwindSafe for Router[src]

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> Downcast for T where
    T: Any

impl<T> DowncastSync for T where
    T: Send + Sync + Any

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>,