[][src]Enum f1_api::packet::event::Event

pub enum Event {
    ChequeredFlag,
    DrsDisabled,
    DrsEnabled,
    FastestLap(FastestLap),
    RaceWinner(RaceWinner),
    Retirement(Retirement),
    SessionEnded,
    SessionStarted,
    TeammatesInPits(TeammateInPits),
}

Events that can occur during the course of a session

The F1 games send event packets whenever a certain event occurs in a session. Depending on the game, only a subset of the defined events may be published. Some events carry a payload that further describes the event. For example, the event declaring the race winner sends with it the vehicle index of said winner.

Variants

ChequeredFlag

The chequered flag signals the end of the race.

DrsDisabled

DRS is disabled at the beginning of the race, and can be disabled throughout the race in case of poor weather conditions or yellow flags in the DRS activation zone.

DrsEnabled

DRS gets enabled after the first two laps of a race. In case DRS is disabled during a race, e.g. due to poor weather conditions, it can be re-enabled once the conditions have cleared.

FastestLap(FastestLap)

When a driver achieves the fastest lap of the race, the event publishes the driver and their time.

RaceWinner(RaceWinner)

At the end of the race, the race winner is announced in an event.

Retirement(Retirement)

Drivers can retire from a race, for example after their car suffers technical issues. The retirement is announced as an event with the driver as the payload.

SessionEnded

The end of a session is announced in an event.

SessionStarted

The start of a session is announced in an event.

TeammatesInPits(TeammateInPits)

When a teammate enters the pits, an event carrying their vehicle index is published.

Trait Implementations

impl Clone for Event[src]

impl Copy for Event[src]

impl Debug for Event[src]

impl Default for Event[src]

impl Display for Event[src]

impl Eq for Event[src]

impl Hash for Event[src]

impl Ord for Event[src]

impl PartialEq<Event> for Event[src]

impl PartialOrd<Event> for Event[src]

impl StructuralEq for Event[src]

impl StructuralPartialEq for Event[src]

Auto Trait Implementations

impl RefUnwindSafe for Event

impl Send for Event

impl Sync for Event

impl Unpin for Event

impl UnwindSafe for Event

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> ToString for T where
    T: Display + ?Sized
[src]

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.