pub struct Participant { /* private fields */ }
Expand description
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.
Implementations§
Source§impl Participant
impl Participant
Sourcepub fn new(
controller: Controller,
driver: Driver,
team: Team,
race_number: u8,
nationality: Nationality,
name: String,
telemetry_privacy: Option<TelemetryPrivacy>,
) -> Self
pub fn new( controller: Controller, driver: Driver, team: Team, race_number: u8, nationality: Nationality, name: String, telemetry_privacy: Option<TelemetryPrivacy>, ) -> Self
Constructs a new Participant
.
Source§impl Participant
impl Participant
Sourcepub fn controller(&self) -> Controller
pub fn controller(&self) -> Controller
Returns the type of controller.
Sourcepub fn race_number(&self) -> u8
pub fn race_number(&self) -> u8
Returns the number of the participant’s car.
Sourcepub fn nationality(&self) -> Nationality
pub fn nationality(&self) -> Nationality
Returns the participant’s nationality.
Sourcepub fn telemetry_privacy(&self) -> Option<TelemetryPrivacy>
pub fn telemetry_privacy(&self) -> Option<TelemetryPrivacy>
Returns the privacy setting for the participant’s telemetry data.
Source§impl Participant
impl Participant
Trait Implementations§
Source§impl Clone for Participant
impl Clone for Participant
Source§fn clone(&self) -> Participant
fn clone(&self) -> Participant
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for Participant
impl Debug for Participant
Source§impl Default for Participant
impl Default for Participant
Source§fn default() -> Participant
fn default() -> Participant
Returns the “default value” for a type. Read more
Source§impl Hash for Participant
impl Hash for Participant
Source§impl Ord for Participant
impl Ord for Participant
Source§fn cmp(&self, other: &Participant) -> Ordering
fn cmp(&self, other: &Participant) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for Participant
impl PartialEq for Participant
Source§impl PartialOrd for Participant
impl PartialOrd for Participant
impl Eq for Participant
impl StructuralPartialEq for Participant
Auto Trait Implementations§
impl Freeze for Participant
impl RefUnwindSafe for Participant
impl Send for Participant
impl Sync for Participant
impl Unpin for Participant
impl UnwindSafe for Participant
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more