pub struct Boarding { /* private fields */ }Expand description
FIFO boarding queue for a single stop.
Implementations§
Source§impl Boarding
impl Boarding
Sourcepub fn board_vehicle(
&mut self,
vehicle: &mut TransitVehicle,
served_stops: &[StopId],
passenger_destinations: &mut Vec<StopId>,
) -> BoardingResult
pub fn board_vehicle( &mut self, vehicle: &mut TransitVehicle, served_stops: &[StopId], passenger_destinations: &mut Vec<StopId>, ) -> BoardingResult
Board a vehicle from the front of the queue. Only waiters whose
destination is in served_stops board; others are left at the
front of the queue (they will wait for a different service).
Returns a summary of how many boarded vs passed over.
Sourcepub fn board_vehicle_with_policy<P: BoardingPolicy>(
&mut self,
vehicle: &mut TransitVehicle,
served_stops: &[StopId],
passenger_destinations: &mut Vec<StopId>,
policy: &P,
) -> BoardingResult
pub fn board_vehicle_with_policy<P: BoardingPolicy>( &mut self, vehicle: &mut TransitVehicle, served_stops: &[StopId], passenger_destinations: &mut Vec<StopId>, policy: &P, ) -> BoardingResult
Board a vehicle using an explicit boarding policy.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Boarding
impl RefUnwindSafe for Boarding
impl Send for Boarding
impl Sync for Boarding
impl Unpin for Boarding
impl UnsafeUnpin for Boarding
impl UnwindSafe for Boarding
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