[−][src]Struct f1_api::packet::participants::ParticipantsPacket
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.
Methods
impl ParticipantsPacket
[src]
pub fn new(
header: Header,
active_participants_count: u8,
participants: Vec<Participant>
) -> Self
[src]
header: Header,
active_participants_count: u8,
participants: Vec<Participant>
) -> Self
Constructs a new ParticipantsPacket
.
impl ParticipantsPacket
[src]
pub fn active_participants_count(&self) -> u8
[src]
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.
impl ParticipantsPacket
[src]
pub fn header(&self) -> &Header
[src]
Returns the packet header prefixing the participants packet.
pub fn participants(&self) -> &Vec<Participant>
[src]
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
impl Clone for ParticipantsPacket
[src]
fn clone(&self) -> ParticipantsPacket
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for ParticipantsPacket
[src]
impl Eq for ParticipantsPacket
[src]
impl Hash for ParticipantsPacket
[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 ParticipantsPacket
[src]
fn cmp(&self, other: &ParticipantsPacket) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<ParticipantsPacket> for ParticipantsPacket
[src]
fn eq(&self, other: &ParticipantsPacket) -> bool
[src]
fn ne(&self, other: &ParticipantsPacket) -> bool
[src]
impl PartialOrd<ParticipantsPacket> for ParticipantsPacket
[src]
fn partial_cmp(&self, other: &ParticipantsPacket) -> Option<Ordering>
[src]
fn lt(&self, other: &ParticipantsPacket) -> bool
[src]
fn le(&self, other: &ParticipantsPacket) -> bool
[src]
fn gt(&self, other: &ParticipantsPacket) -> bool
[src]
fn ge(&self, other: &ParticipantsPacket) -> bool
[src]
impl StructuralEq for ParticipantsPacket
[src]
impl StructuralPartialEq for ParticipantsPacket
[src]
Auto Trait Implementations
impl RefUnwindSafe for ParticipantsPacket
impl Send for ParticipantsPacket
impl Sync for ParticipantsPacket
impl Unpin for ParticipantsPacket
impl UnwindSafe for ParticipantsPacket
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>,