Struct sim::mechanics::parking::NormalParkingSimState [−][src]
pub struct NormalParkingSimState { parked_cars: BTreeMap<CarID, ParkedCar>, occupants: BTreeMap<ParkingSpot, CarID>, reserved_spots: BTreeMap<ParkingSpot, CarID>, onstreet_lanes: BTreeMap<LaneID, ParkingLane>, driving_to_parking_lanes: MultiMap<LaneID, LaneID>, num_spots_per_offstreet: BTreeMap<BuildingID, usize>, driving_to_offstreet: MultiMap<LaneID, (BuildingID, Distance)>, num_spots_per_lot: BTreeMap<ParkingLotID, usize>, driving_to_lots: MultiMap<LaneID, ParkingLotID>, events: Vec<Event>, }
Fields
parked_cars: BTreeMap<CarID, ParkedCar>
occupants: BTreeMap<ParkingSpot, CarID>
reserved_spots: BTreeMap<ParkingSpot, CarID>
onstreet_lanes: BTreeMap<LaneID, ParkingLane>
driving_to_parking_lanes: MultiMap<LaneID, LaneID>
num_spots_per_offstreet: BTreeMap<BuildingID, usize>
driving_to_offstreet: MultiMap<LaneID, (BuildingID, Distance)>
num_spots_per_lot: BTreeMap<ParkingLotID, usize>
driving_to_lots: MultiMap<LaneID, ParkingLotID>
events: Vec<Event>
Implementations
impl NormalParkingSimState
[src]
impl NormalParkingSimState
[src]fn new(map: &Map, timer: &mut Timer<'_>) -> NormalParkingSimState
[src]
Trait Implementations
impl Clone for NormalParkingSimState
[src]
impl Clone for NormalParkingSimState
[src]fn clone(&self) -> NormalParkingSimState
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'de> Deserialize<'de> for NormalParkingSimState
[src]
impl<'de> Deserialize<'de> for NormalParkingSimState
[src]fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl From<NormalParkingSimState> for ParkingSimState
[src]
impl From<NormalParkingSimState> for ParkingSimState
[src]fn from(v: NormalParkingSimState) -> ParkingSimState
[src]
impl ParkingSim for NormalParkingSimState
[src]
impl ParkingSim for NormalParkingSimState
[src]fn handle_live_edits(
&mut self,
map: &Map,
timer: &mut Timer<'_>
) -> (Vec<ParkedCar>, Vec<CarID>)
[src]
&mut self,
map: &Map,
timer: &mut Timer<'_>
) -> (Vec<ParkedCar>, Vec<CarID>)
fn get_free_onstreet_spots(&self, l: LaneID) -> Vec<ParkingSpot>
[src]
fn get_free_offstreet_spots(&self, b: BuildingID) -> Vec<ParkingSpot>
[src]
fn get_free_lot_spots(&self, pl: ParkingLotID) -> Vec<ParkingSpot>
[src]
fn reserve_spot(&mut self, spot: ParkingSpot, car: CarID)
[src]
fn unreserve_spot(&mut self, car: CarID)
[src]
fn remove_parked_car(&mut self, p: ParkedCar)
[src]
fn add_parked_car(&mut self, p: ParkedCar)
[src]
fn get_draw_cars(&self, id: LaneID, map: &Map) -> Vec<DrawCarInput>
[src]
fn get_draw_cars_in_lots(&self, id: LaneID, map: &Map) -> Vec<DrawCarInput>
[src]
fn get_draw_car(&self, id: CarID, map: &Map) -> Option<DrawCarInput>
[src]
fn canonical_pt(&self, id: CarID, map: &Map) -> Option<Pt2D>
[src]
fn get_all_draw_cars(&self, map: &Map) -> Vec<DrawCarInput>
[src]
fn is_free(&self, spot: ParkingSpot) -> bool
[src]
fn get_car_at_spot(&self, spot: ParkingSpot) -> Option<&ParkedCar>
[src]
fn get_all_free_spots(
&self,
driving_pos: Position,
vehicle: &Vehicle,
target: BuildingID,
map: &Map
) -> Vec<(ParkingSpot, Position)>
[src]
&self,
driving_pos: Position,
vehicle: &Vehicle,
target: BuildingID,
map: &Map
) -> Vec<(ParkingSpot, Position)>
fn spot_to_driving_pos(
&self,
spot: ParkingSpot,
vehicle: &Vehicle,
map: &Map
) -> Position
[src]
&self,
spot: ParkingSpot,
vehicle: &Vehicle,
map: &Map
) -> Position
fn spot_to_sidewalk_pos(&self, spot: ParkingSpot, map: &Map) -> Position
[src]
fn get_owner_of_car(&self, id: CarID) -> Option<PersonID>
[src]
fn lookup_parked_car(&self, id: CarID) -> Option<&ParkedCar>
[src]
fn get_all_parking_spots(&self) -> (Vec<ParkingSpot>, Vec<ParkingSpot>)
[src]
fn path_to_free_parking_spot(
&self,
start: LaneID,
vehicle: &Vehicle,
target: BuildingID,
map: &Map
) -> Option<(Vec<PathStep>, ParkingSpot, Position)>
[src]
&self,
start: LaneID,
vehicle: &Vehicle,
target: BuildingID,
map: &Map
) -> Option<(Vec<PathStep>, ParkingSpot, Position)>
fn collect_events(&mut self) -> Vec<Event>
[src]
fn all_parked_car_positions(&self, map: &Map) -> Vec<(Position, PersonID)>
[src]
fn bldg_to_parked_cars(&self, b: BuildingID) -> Vec<CarID>
[src]
impl Serialize for NormalParkingSimState
[src]
impl Serialize for NormalParkingSimState
[src]impl TryInto<NormalParkingSimState> for ParkingSimState
[src]
impl TryInto<NormalParkingSimState> for ParkingSimState
[src]Auto Trait Implementations
impl RefUnwindSafe for NormalParkingSimState
impl Send for NormalParkingSimState
impl Sync for NormalParkingSimState
impl Unpin for NormalParkingSimState
impl UnwindSafe for NormalParkingSimState
Blanket Implementations
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
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>,