pub enum Leg {
Walk {
from: Waypoint,
to: Waypoint,
},
DriveSelf {
mode: TravelMode,
from: Waypoint,
to: Waypoint,
},
Hail {
mode: TravelMode,
from: Waypoint,
to: Waypoint,
},
Transit {
route: RouteId,
board_at: StopId,
alight_at: StopId,
},
Connector {
connector_id: u64,
},
}Expand description
A single leg of a multi-modal trip.
Variants§
Walk
Walk between two waypoints (possibly across floors via connectors).
DriveSelf
Ride a private vehicle (car, bicycle, motorcycle) between two waypoints.
Hail
Hail or board a shared ride (taxi, ride-hail) between two waypoints.
Fields
§
mode: TravelModeTransport mode (usually Vehicle).
Transit
Board a fixed-route transit service.
Fields
Connector
Ride a vertical connector (stair/escalator/ramp/lift).
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Leg
impl RefUnwindSafe for Leg
impl Send for Leg
impl Sync for Leg
impl Unpin for Leg
impl UnsafeUnpin for Leg
impl UnwindSafe for Leg
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more