[][src]Struct f1_api::packet::participants::Participant

pub struct Participant { /* fields omitted */ }

Data about a participant in the session

The F1 games publish data for each participant in a session that identifies them. This data includes the participant's name, team, and nationality among others.

Methods

impl Participant[src]

pub fn new(
    controller: Controller,
    driver: Driver,
    team: Team,
    race_number: u8,
    nationality: Nationality,
    name: String,
    telemetry_privacy: Option<TelemetryPrivacy>
) -> Self
[src]

Constructs a new Participant.

impl Participant[src]

pub fn controller(&self) -> Controller[src]

Returns the type of controller.

pub fn driver(&self) -> Driver[src]

Returns the driver.

pub fn team(&self) -> Team[src]

Returns the participant's team.

pub fn race_number(&self) -> u8[src]

Returns the number of the participant's car.

pub fn nationality(&self) -> Nationality[src]

Returns the participant's nationality.

pub fn telemetry_privacy(&self) -> Option<TelemetryPrivacy>[src]

Returns the privacy setting for the participant's telemetry data.

impl Participant[src]

pub fn name(&self) -> &String[src]

Returns the participant's name.

In single player sessions, the AI is always named after the driver. In multiplayer sessions on PC, a player's SteamID or LAN name is used. On PlayStation, the LAN name is used. On Xbox, the driver name is always used.

Trait Implementations

impl Clone for Participant[src]

impl Debug for Participant[src]

impl Default for Participant[src]

impl Eq for Participant[src]

impl Hash for Participant[src]

impl Ord for Participant[src]

impl PartialEq<Participant> for Participant[src]

impl PartialOrd<Participant> for Participant[src]

impl StructuralEq for Participant[src]

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