Skip to main content

BoardingPolicy

Trait BoardingPolicy 

Source
pub trait BoardingPolicy {
    // Required method
    fn may_board(
        &self,
        waiter: &Waiter,
        vehicle: &TransitVehicle,
        served_stops: &[u64],
    ) -> bool;

    // Provided method
    fn max_boardings(&self) -> Option<u32> { ... }
}
Expand description

Policy for deciding which queued passengers board a vehicle.

Required Methods§

Source

fn may_board( &self, waiter: &Waiter, vehicle: &TransitVehicle, served_stops: &[u64], ) -> bool

Return true if a waiter may board this vehicle.

Provided Methods§

Source

fn max_boardings(&self) -> Option<u32>

Maximum number of passengers this boarding event may board.

Implementors§