[][src]Type Definition f1_api::types::VehicleIndex

type VehicleIndex = u8;

Reference to a vehicle in a packet

In Formula 1, a maximum of 20 cars can participate in any session. The modern F1 games use this rule to use arrays with a static size of 20 whenever they publish data about all vehicles in a session. Data in those arrays is referenced using an unsigned byte. By defining a type alias for the indices, their usage can be checked by the Rust compiler.