[−][src]Struct f1_api::packet::status::CarStatus
Data describing the status of a car
The status of each car is a collection of properties that can change over time. It includes data about the fuel, the engine, the various assistance systems like ABS, DRS, and ERS, and the damage the car has sustained. In multiplayer sessions, some of this data is restricted and only shown for the player's own car.
Methods
impl CarStatus[src]
pub fn new(
traction_control: TractionControl,
abs: bool,
fuel_mix: FuelMix,
brake_bias: u8,
pit_limiter: bool,
fuel_remaining: f32,
fuel_capacity: f32,
fuel_remaining_laps: f32,
max_rpm: u16,
idle_rpm: u16,
gear_count: u8,
drs: DrsSetting,
tyre_wear: CornerProperty<u8>,
physical_tyre_compound: PhysicalTyreCompound,
visual_tyre_compound: VisualTyreCompound,
tyre_damage: CornerProperty<u8>,
front_left_wing_damage: u8,
front_right_wing_damage: u8,
rear_wing_damage: u8,
engine_damage: u8,
gear_box_damage: u8,
vehicle_flags: Flag,
ers_energy: f32,
ers_deploy_mode: ErsDeployMode,
ers_harvest_mgu_k: f32,
ers_harvest_mgu_h: f32,
ers_deployed: f32
) -> Self[src]
traction_control: TractionControl,
abs: bool,
fuel_mix: FuelMix,
brake_bias: u8,
pit_limiter: bool,
fuel_remaining: f32,
fuel_capacity: f32,
fuel_remaining_laps: f32,
max_rpm: u16,
idle_rpm: u16,
gear_count: u8,
drs: DrsSetting,
tyre_wear: CornerProperty<u8>,
physical_tyre_compound: PhysicalTyreCompound,
visual_tyre_compound: VisualTyreCompound,
tyre_damage: CornerProperty<u8>,
front_left_wing_damage: u8,
front_right_wing_damage: u8,
rear_wing_damage: u8,
engine_damage: u8,
gear_box_damage: u8,
vehicle_flags: Flag,
ers_energy: f32,
ers_deploy_mode: ErsDeployMode,
ers_harvest_mgu_k: f32,
ers_harvest_mgu_h: f32,
ers_deployed: f32
) -> Self
Constructs a new CarStatus.
impl CarStatus[src]
pub fn traction_control(&self) -> TractionControl[src]
Returns the traction control setting.
pub fn abs(&self) -> bool[src]
Returns whether ABS is enabled.
pub fn fuel_mix(&self) -> FuelMix[src]
Returns the fuel mix setting.
pub fn brake_bias(&self) -> u8[src]
Returns the front brake bias (percentage).
pub fn pit_limiter(&self) -> bool[src]
Returns whether the pit speed limiter is engaged.
pub fn fuel_remaining(&self) -> f32[src]
Returns the remaining fuel mass in tank.
pub fn fuel_capacity(&self) -> f32[src]
Returns the fuel capacity.
pub fn fuel_remaining_laps(&self) -> f32[src]
Returns the remaining fuel in terms of laps.
pub fn max_rpm(&self) -> u16[src]
Returns the car's maximum RPM where the rev limiter kicks in.
pub fn idle_rpm(&self) -> u16[src]
Returns the car's idle RPM.
pub fn gear_count(&self) -> u8[src]
Returns the car's number of gears.
pub fn drs(&self) -> DrsSetting[src]
Returns the status of DRS.
pub fn physical_tyre_compound(&self) -> PhysicalTyreCompound[src]
Returns the physical compound of the tyres.
pub fn visual_tyre_compound(&self) -> VisualTyreCompound[src]
Returns the visual compound of the tyres.
pub fn front_left_wing_damage(&self) -> u8[src]
Returns the damage to the left front wing in percent.
pub fn front_right_wing_damage(&self) -> u8[src]
Returns the damage to the right front wing in percent.
pub fn rear_wing_damage(&self) -> u8[src]
Returns the damage to the rear wing in percent.
pub fn engine_damage(&self) -> u8[src]
Returns the damage to the engine in percent.
pub fn gear_box_damage(&self) -> u8[src]
Returns the damage to the gear box in percent.
pub fn vehicle_flags(&self) -> Flag[src]
Returns the flags that are being shown to the current car.
pub fn ers_energy(&self) -> f32[src]
Returns the ERS energy store in Joules.
pub fn ers_deploy_mode(&self) -> ErsDeployMode[src]
Returns the ERS deploy mode.
pub fn ers_harvest_mgu_k(&self) -> f32[src]
Returns the ERS energy harvested this lap by the MGU-K.
pub fn ers_harvest_mgu_h(&self) -> f32[src]
Returns the ERS energy harvested this lap by the MGU-H.
pub fn ers_deployed(&self) -> f32[src]
Returns the ERS energy deployed this lap.
impl CarStatus[src]
pub fn tyre_wear(&self) -> &CornerProperty<u8>[src]
Returns the tyre wear at each corner of the car in percent.
pub fn tyre_damage(&self) -> &CornerProperty<u8>[src]
Returns the tyre damage at each corner of the car in percent.
Trait Implementations
impl Clone for CarStatus[src]
impl Copy for CarStatus[src]
impl Debug for CarStatus[src]
impl Default for CarStatus[src]
impl PartialEq<CarStatus> for CarStatus[src]
impl PartialOrd<CarStatus> for CarStatus[src]
fn partial_cmp(&self, other: &CarStatus) -> Option<Ordering>[src]
fn lt(&self, other: &CarStatus) -> bool[src]
fn le(&self, other: &CarStatus) -> bool[src]
fn gt(&self, other: &CarStatus) -> bool[src]
fn ge(&self, other: &CarStatus) -> bool[src]
impl StructuralPartialEq for CarStatus[src]
Auto Trait Implementations
impl RefUnwindSafe for CarStatus
impl Send for CarStatus
impl Sync for CarStatus
impl Unpin for CarStatus
impl UnwindSafe for CarStatus
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>,