[][src]Struct f1_api::packet::session::MarshalZone

pub struct MarshalZone { /* fields omitted */ }

A marshal zone around the track and its current flags.

A race track is divided into many marshal zones. In each zone, flags can be waved to inform drivers about hazards on track, faster cars approaching from behind, and other important status updates. Each zone is represented by a struct containing the fraction of the race track's length where the zone starts, and any flag that is currently being shown there.

Methods

impl MarshalZone[src]

pub fn new(start: f32, flag: Flag) -> Self[src]

Constructs a new MarshalZone.

impl MarshalZone[src]

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

Returns the start point of the marshal zone as a fraction of the race track's total length.

pub fn flag(&self) -> Flag[src]

Returns the flag that is currently being displayed in the marshal zone.

Trait Implementations

impl Clone for MarshalZone[src]

impl Copy for MarshalZone[src]

impl Debug for MarshalZone[src]

impl Default for MarshalZone[src]

impl PartialEq<MarshalZone> for MarshalZone[src]

impl PartialOrd<MarshalZone> for MarshalZone[src]

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