[−][src]Struct f1_api::types::CornerProperty
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]
T: Copy,
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]
T: Copy,
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]
T: Copy,
fn clone(&self) -> CornerProperty<T>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<T: Copy> Copy for CornerProperty<T> where
T: Copy,
[src]
T: Copy,
impl<T: Debug> Debug for CornerProperty<T> where
T: Copy,
[src]
T: Copy,
impl<T: Default> Default for CornerProperty<T> where
T: Copy,
[src]
T: Copy,
fn default() -> CornerProperty<T>
[src]
impl<T: Eq> Eq for CornerProperty<T> where
T: Copy,
[src]
T: Copy,
impl<T: Hash> Hash for CornerProperty<T> where
T: Copy,
[src]
T: Copy,
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<T: Ord> Ord for CornerProperty<T> where
T: Copy,
[src]
T: Copy,
fn cmp(&self, other: &CornerProperty<T>) -> 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<T: PartialEq> PartialEq<CornerProperty<T>> for CornerProperty<T> where
T: Copy,
[src]
T: Copy,
fn eq(&self, other: &CornerProperty<T>) -> bool
[src]
fn ne(&self, other: &CornerProperty<T>) -> bool
[src]
impl<T: PartialOrd> PartialOrd<CornerProperty<T>> for CornerProperty<T> where
T: Copy,
[src]
T: Copy,
fn partial_cmp(&self, other: &CornerProperty<T>) -> Option<Ordering>
[src]
fn lt(&self, other: &CornerProperty<T>) -> bool
[src]
fn le(&self, other: &CornerProperty<T>) -> bool
[src]
fn gt(&self, other: &CornerProperty<T>) -> bool
[src]
fn ge(&self, other: &CornerProperty<T>) -> bool
[src]
impl<T> StructuralEq for CornerProperty<T> where
T: Copy,
[src]
T: Copy,
impl<T> StructuralPartialEq for CornerProperty<T> where
T: Copy,
[src]
T: Copy,
Auto Trait Implementations
impl<T> RefUnwindSafe for CornerProperty<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for CornerProperty<T> where
T: Send,
T: Send,
impl<T> Sync for CornerProperty<T> where
T: Sync,
T: Sync,
impl<T> Unpin for CornerProperty<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for CornerProperty<T> where
T: UnwindSafe,
T: UnwindSafe,
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>,