[][src]Enum f1_api::packet::Packet

pub enum Packet {
    Event(EventPacket),
    Lap(LapPacket),
    Motion(MotionPacket),
    Participants(ParticipantsPacket),
    Session(SessionPacket),
    Setup(CarSetupPacket),
    Status(CarStatusPacket),
    Telemetry(TelemetryPacket),
}

A packet published by an F1 game.

The F1 games publish different packets with different data at different intervals. Each of these packets is decoded from UDP to their respective representation in this Rust crate. The Packet enum lists all packets that can be expected, and that a client should handle.

Variants

The F1 games send event packets whenever certain events occur in a session. Some event packets carry a payload with more information about the event.

Lap data packets provide information about each car in a session, and are sent at an interval that can be configured in the game.

Motion(MotionPacket)

The motion data packet describes the movement and position of each car in the session, with additional details being provided for the player's car.

Participants(ParticipantsPacket)

Packet with information on all participants in the session, for example their name, team, and nationality.

Session(SessionPacket)

The F1 games provide information about the current session on a regular basis.

Car setup packets publish the setup of each car in the session. In multiplayer sessions, the setups of other player's cars are redacted to enable a fair competition.

The F1 games send packets with data about the status of each car in a session at a configurable interval.

Telemetry(TelemetryPacket)

Telemetry data is provided for all cars in the session.

Trait Implementations

impl Clone for Packet[src]

impl Debug for Packet[src]

impl PartialEq<Packet> for Packet[src]

impl PartialOrd<Packet> for Packet[src]

impl StructuralPartialEq for Packet[src]

Auto Trait Implementations

impl RefUnwindSafe for Packet

impl Send for Packet

impl Sync for Packet

impl Unpin for Packet

impl UnwindSafe for Packet

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.