[−][src]Struct f1_api::packet::participants::Participant
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]
controller: Controller,
driver: Driver,
team: Team,
race_number: u8,
nationality: Nationality,
name: String,
telemetry_privacy: Option<TelemetryPrivacy>
) -> Self
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]
fn clone(&self) -> Participant[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Debug for Participant[src]
impl Default for Participant[src]
fn default() -> Participant[src]
impl Eq for Participant[src]
impl Hash for Participant[src]
fn hash<__H: Hasher>(&self, state: &mut __H)[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
H: Hasher,
impl Ord for Participant[src]
fn cmp(&self, other: &Participant) -> Ordering[src]
#[must_use]fn max(self, other: Self) -> Self1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self[src]
impl PartialEq<Participant> for Participant[src]
fn eq(&self, other: &Participant) -> bool[src]
fn ne(&self, other: &Participant) -> bool[src]
impl PartialOrd<Participant> for Participant[src]
fn partial_cmp(&self, other: &Participant) -> Option<Ordering>[src]
fn lt(&self, other: &Participant) -> bool[src]
fn le(&self, other: &Participant) -> bool[src]
fn gt(&self, other: &Participant) -> bool[src]
fn ge(&self, other: &Participant) -> bool[src]
impl StructuralEq for Participant[src]
impl StructuralPartialEq for Participant[src]
Auto Trait Implementations
impl RefUnwindSafe for Participant
impl Send for Participant
impl Sync for Participant
impl Unpin for Participant
impl UnwindSafe for Participant
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,