[][src]Struct f1_api::packet::event::TeammateInPits

pub struct TeammateInPits { /* fields omitted */ }

Payload for teammate in pits event

When a teammate enters the pits, an event is sent carrying the vehicle index of the teammate as its payload.

Examples

// Simplified use in a match statement
match event {
    Event::TeammatesInPits(teammate) => {
        assert_eq!(0, teammate.vehicle_index());
    }
}

Methods

impl TeammateInPits[src]

pub fn new(vehicle_index: VehicleIndex) -> Self[src]

Constructs a new TeammateInPits.

impl TeammateInPits[src]

pub fn vehicle_index(&self) -> VehicleIndex[src]

Returns the index of the teammate who has just entered the pits.

Trait Implementations

impl Clone for TeammateInPits[src]

impl Copy for TeammateInPits[src]

impl Debug for TeammateInPits[src]

impl Default for TeammateInPits[src]

impl Display for TeammateInPits[src]

impl Eq for TeammateInPits[src]

impl Hash for TeammateInPits[src]

impl Ord for TeammateInPits[src]

impl PartialEq<TeammateInPits> for TeammateInPits[src]

impl PartialOrd<TeammateInPits> for TeammateInPits[src]

impl StructuralEq for TeammateInPits[src]

impl StructuralPartialEq for TeammateInPits[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> 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.