[][src]Struct f1_api::packet::setup::CarSetup

pub struct CarSetup { /* fields omitted */ }

Setup of a car

The setup of a car in the F1 games consists of a set of parameters that players can adjust before leaving the garage.

Methods

impl CarSetup[src]

pub fn new(
    front_wing: u8,
    rear_wing: u8,
    on_throttle: u8,
    off_throttle: u8,
    front_camber: f32,
    rear_camber: f32,
    front_toe: f32,
    rear_toe: f32,
    front_suspension: u8,
    rear_suspension: u8,
    front_anti_roll_bar: u8,
    rear_anti_roll_bar: u8,
    front_suspension_height: u8,
    rear_suspension_height: u8,
    brake_pressure: u8,
    brake_bias: u8,
    front_tyre_pressure: f32,
    rear_tyre_pressure: f32,
    ballast: u8,
    fuel_load: f32
) -> Self
[src]

Constructs a new CarSetup.

impl CarSetup[src]

pub fn front_wing(&self) -> u8[src]

Returns the setting for the front wing aero.

pub fn rear_wing(&self) -> u8[src]

Returns the setting for the rear wing aero.

pub fn on_throttle(&self) -> u8[src]

Returns the differential adjustment on throttle as a percentage.

pub fn off_throttle(&self) -> u8[src]

Returns the differential adjustment off throttle as a percentage.

pub fn front_camber(&self) -> f32[src]

Returns the setting for the front camber angle.

pub fn rear_camber(&self) -> f32[src]

Returns the setting for the rear camber angle.

pub fn front_toe(&self) -> f32[src]

Returns the setting for the front toe angle.

pub fn rear_toe(&self) -> f32[src]

Returns the setting for the rear toe angle.

pub fn front_suspension(&self) -> u8[src]

Returns the front suspension setting.

pub fn rear_suspension(&self) -> u8[src]

Returns the rear suspension setting.

pub fn front_anti_roll_bar(&self) -> u8[src]

Returns the setting for the front anti-roll bar.

pub fn rear_anti_roll_bar(&self) -> u8[src]

Returns the setting for the rear anti-roll bar.

pub fn front_suspension_height(&self) -> u8[src]

Returns the setting for the front ride height.

pub fn rear_suspension_height(&self) -> u8[src]

Returns the setting for the rear right height.

pub fn brake_pressure(&self) -> u8[src]

Returns the setting for the brake pressure as a percentage.

pub fn brake_bias(&self) -> u8[src]

Returns the setting for the brake bias as a percentage.

pub fn front_tyre_pressure(&self) -> f32[src]

Returns the setting for the front tyre pressure in psi.

pub fn rear_tyre_pressure(&self) -> f32[src]

Returns the setting for the rear tyre pressure in psi.

pub fn ballast(&self) -> u8[src]

Returns the setting for additional ballast.

pub fn fuel_load(&self) -> f32[src]

Returns the setting for the fuel load.

Trait Implementations

impl Clone for CarSetup[src]

impl Copy for CarSetup[src]

impl Debug for CarSetup[src]

impl Default for CarSetup[src]

impl PartialEq<CarSetup> for CarSetup[src]

impl PartialOrd<CarSetup> for CarSetup[src]

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