#[non_exhaustive]pub struct LapData {Show 33 fields
pub last_lap_time_ms: u32,
pub current_lap_time_ms: u32,
pub sector1_time_ms_part: u16,
pub sector1_time_minutes_part: u8,
pub sector2_time_ms_part: u16,
pub sector2_time_minutes_part: u8,
pub delta_to_car_in_front_ms_part: u16,
pub delta_to_car_in_front_minutes_part: u8,
pub delta_to_race_leader_ms: u16,
pub delta_to_race_leader_minutes_part: u8,
pub lap_distance: f32,
pub total_distance: f32,
pub safety_car_delta: f32,
pub car_position: u8,
pub current_lap_num: u8,
pub pit_status: PitStatus,
pub num_pit_stops: u8,
pub sector: Sector,
pub current_lap_invalid: bool,
pub penalties: u8,
pub total_warnings: u8,
pub corner_cutting_warnings: u8,
pub num_unserved_drive_through_pens: u8,
pub num_unserved_stop_go_pens: u8,
pub grid_position: u8,
pub driver_status: DriverStatus,
pub result_status: ResultStatus,
pub pit_lane_timer_active: bool,
pub pit_lane_time_in_lane_ms: u16,
pub pit_stop_timer_ms: u16,
pub pit_stop_should_serve_pen: bool,
pub speed_trap_fastest_speed: f32,
pub speed_trap_fastest_lap: u8,
}Expand description
Lap data for a car on track.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.last_lap_time_ms: u32Last lap time in milliseconds.
current_lap_time_ms: u32Current lap time in milliseconds.
sector1_time_ms_part: u16Current sector 1 time millisecond part.
sector1_time_minutes_part: u8Sector 1 whole minute part. Available from the 2023 format onwards.
sector2_time_ms_part: u16Current sector 2 time millisecond part.
sector2_time_minutes_part: u8Sector 2 whole minute part. Available from the 2023 format onwards.
delta_to_car_in_front_ms_part: u16Time delta to car in front in milliseconds. Available from the 2023 format onwards.
delta_to_car_in_front_minutes_part: u8Time delta to car in front whole minute part. Available from the 2024 format onwards.
delta_to_race_leader_ms: u16Time delta to race leader in milliseconds. Available from the 2023 format onwards.
delta_to_race_leader_minutes_part: u8Time delta to car in front whole minute part. Available from the 2024 format onwards.
lap_distance: f32The distance the vehicle is around current lap in metres. It may be negative if the start/finish line hasn’t been crossed yet.
total_distance: f32The total distance the vehicle has gone around in this session in metres. It may be negative if the start/finish line hasn’t been crossed yet.
safety_car_delta: f32Delta for the safety car in seconds.
car_position: u8Car’s race position.
current_lap_num: u8Current lap number.
pit_status: PitStatusCar’s pit status.
num_pit_stops: u8Number of pit stops taken in this race.
sector: SectorZero-based number of the sector the driver is currently going through.
current_lap_invalid: boolWhether the current lap is invalid.
penalties: u8Accumulated time penalties to be added in seconds.
total_warnings: u8Accumulated number of warnings issued.
corner_cutting_warnings: u8Accumulated number of corner cutting warnings issued. Available from the 2023 format onwards.
num_unserved_drive_through_pens: u8Number of unserved drive through penalties left to serve.
num_unserved_stop_go_pens: u8Number of unserved stop-go penalties left to serve.
grid_position: u8The grid position the vehicle started the race in.
driver_status: DriverStatusStatus of the driver.
result_status: ResultStatusStatus of the driver’s result.
pit_lane_timer_active: boolWhether the pit lane timer is active.
pit_lane_time_in_lane_ms: u16Current time spent in the pit lane in milliseconds.
pit_stop_timer_ms: u16Time of the actual pit stop in milliseconds.
pit_stop_should_serve_pen: boolWhether the car should serve a penalty at this stop.
speed_trap_fastest_speed: f32Fastest speed through speed trap for this car in kilometres per hour. Available from the 2024 format onwards.
speed_trap_fastest_lap: u8Number of the lap the fastest speed was achieved on (255 means “not set”). Available from the 2024 format onwards.
Trait Implementations§
Source§impl BinRead for LapData
impl BinRead for LapData
Source§fn read_options<R: Read + Seek>(
__binrw_generated_var_reader: &mut R,
__binrw_generated_var_endian: Endian,
__binrw_generated_var_arguments: Self::Args<'_>,
) -> BinResult<Self>
fn read_options<R: Read + Seek>( __binrw_generated_var_reader: &mut R, __binrw_generated_var_endian: Endian, __binrw_generated_var_arguments: Self::Args<'_>, ) -> BinResult<Self>
Source§fn read<R>(reader: &mut R) -> Result<Self, Error>
fn read<R>(reader: &mut R) -> Result<Self, Error>
Self from the reader using default arguments. Read moreSource§fn read_be<R>(reader: &mut R) -> Result<Self, Error>
fn read_be<R>(reader: &mut R) -> Result<Self, Error>
Self from the reader using default arguments and assuming
big-endian byte order. Read moreSource§fn read_le<R>(reader: &mut R) -> Result<Self, Error>
fn read_le<R>(reader: &mut R) -> Result<Self, Error>
Self from the reader using default arguments and assuming
little-endian byte order. Read moreSource§fn read_ne<R>(reader: &mut R) -> Result<Self, Error>
fn read_ne<R>(reader: &mut R) -> Result<Self, Error>
T from the reader assuming native-endian byte order. Read moreSource§fn read_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
fn read_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
Self from the reader using the given arguments. Read moreSource§fn read_be_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
fn read_be_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
Self from the reader, assuming big-endian byte order, using the
given arguments. Read more