pub struct ParticipantsPacket { /* private fields */ }
Expand description
Packet containing information about each participant in the session
The F1 games provide information about each participant in a session, for example their name, team, and nationality. The data is updated every 5 seconds.
Implementations§
Source§impl ParticipantsPacket
impl ParticipantsPacket
Sourcepub fn active_participants_count(&self) -> u8
pub fn active_participants_count(&self) -> u8
Returns the number of active participant in the session.
The number of active participants in the packet should match the number of cars on the HUD in-game.
Source§impl ParticipantsPacket
impl ParticipantsPacket
Sourcepub fn participants(&self) -> &Vec<Participant>
pub fn participants(&self) -> &Vec<Participant>
Returns the participants in the session.
As is the case in other packets, the participants packet always contain 20 entries. This is also the case when there are less then 20 active participants in the session.
Trait Implementations§
Source§impl Clone for ParticipantsPacket
impl Clone for ParticipantsPacket
Source§fn clone(&self) -> ParticipantsPacket
fn clone(&self) -> ParticipantsPacket
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 ParticipantsPacket
impl Debug for ParticipantsPacket
Source§impl Hash for ParticipantsPacket
impl Hash for ParticipantsPacket
Source§impl Ord for ParticipantsPacket
impl Ord for ParticipantsPacket
Source§fn cmp(&self, other: &ParticipantsPacket) -> Ordering
fn cmp(&self, other: &ParticipantsPacket) -> 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 ParticipantsPacket
impl PartialEq for ParticipantsPacket
Source§impl PartialOrd for ParticipantsPacket
impl PartialOrd for ParticipantsPacket
impl Eq for ParticipantsPacket
impl StructuralPartialEq for ParticipantsPacket
Auto Trait Implementations§
impl Freeze for ParticipantsPacket
impl RefUnwindSafe for ParticipantsPacket
impl Send for ParticipantsPacket
impl Sync for ParticipantsPacket
impl Unpin for ParticipantsPacket
impl UnwindSafe for ParticipantsPacket
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