[−][src]Struct f1_api::packet::event::FastestLap
Payload for fastest lap event
The fastest lap event contains the driver achieving the fastest lap as well as the lap time as its payload. The driver is referenced through the vehicle index, while the lap time is provided in seconds.
Examples
// Simplified use in a match statement match event { Event::FastestLap(lap) => { assert_eq!(0, lap.vehicle_index()); assert_eq!(62, lap.time().as_secs()); } }
Methods
impl FastestLap[src]
pub fn new(vehicle_index: VehicleIndex, time: Duration) -> Self[src]
Constructs a new FastestLap.
impl FastestLap[src]
impl FastestLap[src]
pub fn vehicle_index(&self) -> VehicleIndex[src]
Returns the index of the car achieving the fastest lap.
Trait Implementations
impl Clone for FastestLap[src]
fn clone(&self) -> FastestLap[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Copy for FastestLap[src]
impl Debug for FastestLap[src]
impl Default for FastestLap[src]
fn default() -> FastestLap[src]
impl Display for FastestLap[src]
impl Eq for FastestLap[src]
impl Hash for FastestLap[src]
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 Ord for FastestLap[src]
fn cmp(&self, other: &FastestLap) -> Ordering[src]
#[must_use]fn max(self, other: Self) -> Self1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self[src]
impl PartialEq<FastestLap> for FastestLap[src]
fn eq(&self, other: &FastestLap) -> bool[src]
fn ne(&self, other: &FastestLap) -> bool[src]
impl PartialOrd<FastestLap> for FastestLap[src]
fn partial_cmp(&self, other: &FastestLap) -> Option<Ordering>[src]
fn lt(&self, other: &FastestLap) -> bool[src]
fn le(&self, other: &FastestLap) -> bool[src]
fn gt(&self, other: &FastestLap) -> bool[src]
fn ge(&self, other: &FastestLap) -> bool[src]
impl StructuralEq for FastestLap[src]
impl StructuralPartialEq for FastestLap[src]
Auto Trait Implementations
impl RefUnwindSafe for FastestLap
impl Send for FastestLap
impl Sync for FastestLap
impl Unpin for FastestLap
impl UnwindSafe for FastestLap
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> ToString for T where
T: Display + ?Sized, [src]
T: Display + ?Sized,
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>,