[][src]Struct f1_telemetry_client::f1_2020::session::PacketSessionData

pub struct PacketSessionData {
    pub header: PacketHeader,
    pub weather: Weather,
    pub track_temperature: i8,
    pub air_temperature: i8,
    pub total_laps: u8,
    pub track_length: u16,
    pub session_type: SessionType,
    pub track_id: Track,
    pub formula: Formula,
    pub session_time_left: u16,
    pub session_duration: u16,
    pub pit_speed_limit: u8,
    pub game_paused: u8,
    pub is_spectating: u8,
    pub spectator_car_index: u8,
    pub sli_pro_native_support: u8,
    pub num_marshal_zones: u8,
    pub marshal_zone: Vec<MarshalZone>,
    pub safety_car_status: SafetyCar,
    pub network_game: NetworkGame,
    pub num_weather_forecast_samples: u8,
    pub weather_forecast_sample: Vec<WeatherForecastSample>,
}

Fields

header: PacketHeader

Header

weather: Weather

Weather - 0 = clear, 1 = light cloud, 2 = overcast, 3 = light rain, 4 = heavy rain, 5 = storm

track_temperature: i8

Track temp. in degrees celsius

air_temperature: i8

Air temp. in degrees celsius

total_laps: u8

Total number of laps in this race

track_length: u16

Track length in metres

session_type: SessionType

0 = unknown, 1 = P1, 2 = P2, 3 = P3, 4 = Short P 5 = Q1, 6 = Q2, 7 = Q3, 8 = Short Q, 9 = OSQ 10 = R, 11 = R2, 12 = Time Trial

track_id: Track

-1 for unknown, 0-21 for tracks, see appendix

formula: Formula

Formula, 0 = F1 Modern, 1 = F1 Classic, 2 = F2, 3 = F1 Generic

session_time_left: u16

Time left in session in seconds

session_duration: u16

Session duration in seconds

pit_speed_limit: u8

Pit speed limit in kilometres per hour

game_paused: u8

Whether the game is paused

is_spectating: u8

Whether the player is spectating

spectator_car_index: u8

Index of the car being spectated

sli_pro_native_support: u8

SLI Pro support, 0 = inactive, 1 = active

num_marshal_zones: u8

Number of marshal zones to follow

marshal_zone: Vec<MarshalZone>

List of marshal zones – max 21

safety_car_status: SafetyCar

0 = no safety car, 1 = full safety car 2 = virtual safety car

network_game: NetworkGame

0 = offline, 1 = online

num_weather_forecast_samples: u8

Number of weather samples to follow

weather_forecast_sample: Vec<WeatherForecastSample>

Array of weather forecast samples

Trait Implementations

impl Clone for PacketSessionData[src]

impl Debug for PacketSessionData[src]

impl Eq for PacketSessionData[src]

impl PartialEq<PacketSessionData> for PacketSessionData[src]

impl StructuralPartialEq for PacketSessionData[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.