Enum sim::make::spawner::TripSpec [−][src]
pub(crate) enum TripSpec { VehicleAppearing { start_pos: Position, goal: DrivingGoal, use_vehicle: CarID, retry_if_no_room: bool, }, SpawningFailure { use_vehicle: Option<CarID>, error: String, }, UsingParkedCar { car: CarID, start_bldg: BuildingID, goal: DrivingGoal, }, JustWalking { start: SidewalkSpot, goal: SidewalkSpot, }, UsingBike { bike: CarID, start: BuildingID, goal: DrivingGoal, }, UsingTransit { start: SidewalkSpot, goal: SidewalkSpot, route: BusRouteID, stop1: BusStopID, maybe_stop2: Option<BusStopID>, }, }
Variants
Can be used to spawn from a border or anywhere for interactive debugging.
Show fields
Fields of VehicleAppearing
start_pos: Position
goal: DrivingGoal
use_vehicle: CarID
This must be a currently off-map vehicle owned by the person.
retry_if_no_room: bool
Something went wrong spawning the trip.
Show fields
Fields of UsingParkedCar
car: CarID
This must be a currently parked vehicle owned by the person.
start_bldg: BuildingID
goal: DrivingGoal
Show fields
Fields of JustWalking
start: SidewalkSpot
goal: SidewalkSpot
Show fields
Fields of UsingBike
Show fields
Fields of UsingTransit
start: SidewalkSpot
goal: SidewalkSpot
route: BusRouteID
stop1: BusStopID
maybe_stop2: Option<BusStopID>
Implementations
impl TripSpec
[src]
impl TripSpec
[src]pub fn into_plan(self, map: &Map) -> (TripSpec, Vec<TripLeg>)
[src]
pub fn maybe_new(
from: TripEndpoint,
to: TripEndpoint,
mode: TripMode,
use_vehicle: Option<CarID>,
retry_if_no_room: bool,
map: &Map
) -> Result<TripSpec>
[src]
from: TripEndpoint,
to: TripEndpoint,
mode: TripMode,
use_vehicle: Option<CarID>,
retry_if_no_room: bool,
map: &Map
) -> Result<TripSpec>
Turn an origin/destination pair and mode into a specific plan for instantiating a trip. Decisions like how to use public transit happen here.
Trait Implementations
impl<'de> Deserialize<'de> for TripSpec
[src]
impl<'de> Deserialize<'de> for TripSpec
[src]fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl StructuralPartialEq for TripSpec
[src]
Auto Trait Implementations
impl RefUnwindSafe for TripSpec
impl Send for TripSpec
impl Sync for TripSpec
impl Unpin for TripSpec
impl UnwindSafe for TripSpec
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>,