Struct traffic_signal_data::Turn[][src]

pub struct Turn {
    pub from: DirectedRoad,
    pub to: DirectedRoad,
    pub intersection_osm_node_id: i64,
    pub is_crosswalk: bool,
}

A movement through an intersection.

Movements over crosswalks are a little confusing to understand. See the crosswalk_turns.png diagram in this repository for some clarification.

Fields

from: DirectedRoad

The movement begins at the end of this road segment.

to: DirectedRoad

The movement ends at the beginning of this road segment.

intersection_osm_node_id: i64

The ID of the OSM node representing the intersection. This is redundant for turns performed by vehicles, but is necessary for disambiguating the 4 cases of crosswalks.

is_crosswalk: bool

True iff the movement is along a crosswalk. Note that moving over a crosswalk has a different Turn for each direction.

Trait Implementations

impl Clone for Turn[src]

impl Debug for Turn[src]

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

impl Eq for Turn[src]

impl Ord for Turn[src]

impl PartialEq<Turn> for Turn[src]

impl PartialOrd<Turn> for Turn[src]

impl Serialize for Turn[src]

impl StructuralEq for Turn[src]

impl StructuralPartialEq for Turn[src]

Auto Trait Implementations

impl RefUnwindSafe for Turn[src]

impl Send for Turn[src]

impl Sync for Turn[src]

impl Unpin for Turn[src]

impl UnwindSafe for Turn[src]

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.