Enum gtfs_rt::vehicle_position::OccupancyStatus
source · #[repr(i32)]pub enum OccupancyStatus {
Empty = 0,
ManySeatsAvailable = 1,
FewSeatsAvailable = 2,
StandingRoomOnly = 3,
CrushedStandingRoomOnly = 4,
Full = 5,
NotAcceptingPassengers = 6,
NoDataAvailable = 7,
NotBoardable = 8,
}
Expand description
The state of passenger occupancy for the vehicle or carriage.
Individual producers may not publish all OccupancyStatus values. Therefore, consumers
must not assume that the OccupancyStatus values follow a linear scale.
Consumers should represent OccupancyStatus values as the state indicated
and intended by the producer. Likewise, producers must use OccupancyStatus values that
correspond to actual vehicle occupancy states.
For describing passenger occupancy levels on a linear scale, see occupancy_percentage
.
This field is still experimental, and subject to change. It may be formally adopted in the future.
Variants§
Empty = 0
The vehicle or carriage is considered empty by most measures, and has few or no passengers onboard, but is still accepting passengers.
ManySeatsAvailable = 1
The vehicle or carriage has a large number of seats available. The amount of free seats out of the total seats available to be considered large enough to fall into this category is determined at the discretion of the producer.
FewSeatsAvailable = 2
The vehicle or carriage has a relatively small number of seats available. The amount of free seats out of the total seats available to be considered small enough to fall into this category is determined at the discretion of the feed producer.
StandingRoomOnly = 3
The vehicle or carriage can currently accommodate only standing passengers.
CrushedStandingRoomOnly = 4
The vehicle or carriage can currently accommodate only standing passengers and has limited space for them.
Full = 5
The vehicle or carriage is considered full by most measures, but may still be allowing passengers to board.
NotAcceptingPassengers = 6
The vehicle or carriage is not accepting passengers, but usually accepts passengers for boarding.
NoDataAvailable = 7
The vehicle or carriage doesn’t have any occupancy data available at that time.
NotBoardable = 8
The vehicle or carriage is not boardable and never accepts passengers. Useful for special vehicles or carriages (engine, maintenance carriage, etc…).
Implementations§
source§impl OccupancyStatus
impl OccupancyStatus
sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
source§impl Clone for OccupancyStatus
impl Clone for OccupancyStatus
source§fn clone(&self) -> OccupancyStatus
fn clone(&self) -> OccupancyStatus
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for OccupancyStatus
impl Debug for OccupancyStatus
source§impl Default for OccupancyStatus
impl Default for OccupancyStatus
source§fn default() -> OccupancyStatus
fn default() -> OccupancyStatus
source§impl From<OccupancyStatus> for i32
impl From<OccupancyStatus> for i32
source§fn from(value: OccupancyStatus) -> i32
fn from(value: OccupancyStatus) -> i32
source§impl Hash for OccupancyStatus
impl Hash for OccupancyStatus
source§impl Ord for OccupancyStatus
impl Ord for OccupancyStatus
source§fn cmp(&self, other: &OccupancyStatus) -> Ordering
fn cmp(&self, other: &OccupancyStatus) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for OccupancyStatus
impl PartialEq for OccupancyStatus
source§fn eq(&self, other: &OccupancyStatus) -> bool
fn eq(&self, other: &OccupancyStatus) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for OccupancyStatus
impl PartialOrd for OccupancyStatus
source§fn partial_cmp(&self, other: &OccupancyStatus) -> Option<Ordering>
fn partial_cmp(&self, other: &OccupancyStatus) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more