[][src]Struct f1_api::types::CornerProperty

pub struct CornerProperty<T> where
    T: Copy
{ /* fields omitted */ }

Property on each corner of a car

The F1 games publish telemetry data and setup parameters that describe each corner of a car. For example, the suspension settings or tyre pressures are a set of four numbers, one for each corner of the car. These properties can be expressed by the Corner type.

Examples

use f1_api::types::CornerProperty;

let suspension_position = CornerProperty::new(1.0, 0.9, 1.1, 1.0);

Methods

impl<T> CornerProperty<T> where
    T: Copy
[src]

pub fn new(front_left: T, front_right: T, rear_left: T, rear_right: T) -> Self[src]

Constructs a new CornerProperty.

impl<T> CornerProperty<T> where
    T: Copy
[src]

pub fn front_left(&self) -> T[src]

Returns the value of the property at the front left.

pub fn front_right(&self) -> T[src]

Returns the value of the property at the front right.

pub fn rear_left(&self) -> T[src]

Returns the value of the property at the rear left.

pub fn rear_right(&self) -> T[src]

Returns the value of the property at the rear right.

Trait Implementations

impl<T: Clone> Clone for CornerProperty<T> where
    T: Copy
[src]

impl<T: Copy> Copy for CornerProperty<T> where
    T: Copy
[src]

impl<T: Debug> Debug for CornerProperty<T> where
    T: Copy
[src]

impl<T: Default> Default for CornerProperty<T> where
    T: Copy
[src]

impl<T: Eq> Eq for CornerProperty<T> where
    T: Copy
[src]

impl<T: Hash> Hash for CornerProperty<T> where
    T: Copy
[src]

impl<T: Ord> Ord for CornerProperty<T> where
    T: Copy
[src]

impl<T: PartialEq> PartialEq<CornerProperty<T>> for CornerProperty<T> where
    T: Copy
[src]

impl<T: PartialOrd> PartialOrd<CornerProperty<T>> for CornerProperty<T> where
    T: Copy
[src]

impl<T> StructuralEq for CornerProperty<T> where
    T: Copy
[src]

impl<T> StructuralPartialEq for CornerProperty<T> where
    T: Copy
[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for CornerProperty<T> where
    T: RefUnwindSafe

impl<T> Send for CornerProperty<T> where
    T: Send

impl<T> Sync for CornerProperty<T> where
    T: Sync

impl<T> Unpin for CornerProperty<T> where
    T: Unpin

impl<T> UnwindSafe for CornerProperty<T> where
    T: UnwindSafe

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.