Struct traffic_signal_data::Turn
source · [−]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
sourceimpl<'de> Deserialize<'de> for Turn
impl<'de> Deserialize<'de> for Turn
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Ord for Turn
impl Ord for Turn
sourceimpl PartialOrd<Turn> for Turn
impl PartialOrd<Turn> for Turn
sourcefn partial_cmp(&self, other: &Turn) -> Option<Ordering>
fn partial_cmp(&self, other: &Turn) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Eq for Turn
impl StructuralEq for Turn
impl StructuralPartialEq for Turn
Auto Trait Implementations
impl RefUnwindSafe for Turn
impl Send for Turn
impl Sync for Turn
impl Unpin for Turn
impl UnwindSafe for Turn
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more