[][src]Struct traffic_signal_data::Phase

pub struct Phase {
    pub protected_turns: BTreeSet<Turn>,
    pub permitted_turns: BTreeSet<Turn>,
    pub phase_type: PhaseType,
}

A traffic signal is in one phase at any time. The phase describes what movements are possible.

Fields

protected_turns: BTreeSet<Turn>

During this phase, these turns can be performed with the highest priority, protected by a green light. No two protected turns in the same phase should cross; that would be a conflict.

permitted_turns: BTreeSet<Turn>

During this phase, these turns can be performed after yielding. For example, an unprotected left turn after yielding to oncoming traffic, or a right turn on red after yielding to oncoming traffic and crosswalks.

phase_type: PhaseType

The phase lasts this long before moving to the next one.

Trait Implementations

impl Clone for Phase[src]

impl Debug for Phase[src]

impl<'de> Deserialize<'de> for Phase[src]

impl PartialEq<Phase> for Phase[src]

impl Serialize for Phase[src]

impl StructuralPartialEq for Phase[src]

Auto Trait Implementations

impl RefUnwindSafe for Phase

impl Send for Phase

impl Sync for Phase

impl Unpin for Phase

impl UnwindSafe for Phase

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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[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.