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,
}
Expand description

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

Restrict a value to a certain interval. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.