[][src]Struct f1_api::packet::telemetry::TelemetryPacket

pub struct TelemetryPacket { /* fields omitted */ }

Packet containing the telemetry of all cars in the session

The F1 games publish telemetry data for each car in the session. The telemetry data includes parameters such as the car's speed, as well as information in controller inputs from the user.

Methods

impl TelemetryPacket[src]

pub fn new(
    header: Header,
    telemetry: Vec<Telemetry>,
    button_status: Button
) -> Self
[src]

Constructs a new TelemetryPacket.

impl TelemetryPacket[src]

pub fn button_status(&self) -> Button[src]

Returns a bit flag indicating which buttons are currently pressed.

impl TelemetryPacket[src]

pub fn header(&self) -> &Header[src]

Returns the packet header prefixing the telemetry packet.

pub fn telemetry(&self) -> &Vec<Telemetry>[src]

Returns the telemetry data for each car in the session.

Trait Implementations

impl Clone for TelemetryPacket[src]

impl Debug for TelemetryPacket[src]

impl PartialEq<TelemetryPacket> for TelemetryPacket[src]

impl PartialOrd<TelemetryPacket> for TelemetryPacket[src]

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