Struct map_model::objects::turn::Turn [−][src]
pub struct Turn { pub id: TurnID, pub turn_type: TurnType, pub geom: PolyLine, pub other_crosswalk_ids: BTreeSet<TurnID>, }
A Turn leads from the end of one Lane to the start of another. (Except for pedestrians; sidewalks are bidirectional.)
Fields
id: TurnID
turn_type: TurnType
geom: PolyLine
other_crosswalk_ids: BTreeSet<TurnID>
Empty except for TurnType::Crosswalk. Usually just one other ID, except for the case of 4 duplicates at a degenerate intersection.
Implementations
impl Turn
[src]
impl Turn
[src]pub fn conflicts_with(&self, other: &Turn) -> bool
[src]
pub fn angle(&self) -> Angle
[src]
pub fn between_sidewalks(&self) -> bool
[src]
pub fn penalty(
&self,
constraints: PathConstraints,
map: &Map
) -> (usize, usize, usize)
[src]
&self,
constraints: PathConstraints,
map: &Map
) -> (usize, usize, usize)
Penalties for (lane types, lane-changing, slow lane). The penalty may depend on the vehicle performing the turn. Lower means preferable.
pub fn is_crossing_arterial_intersection(&self, map: &Map) -> bool
[src]
pub(crate) fn permitted_by_lane(&self, map: &Map) -> bool
[src]
Is this turn legal, according to turn lane tagging?
pub(crate) fn permitted_by_road(&self, i: &Intersection, map: &Map) -> bool
[src]
Is this turn legal, according to turn restrictions defined between road segments?
Trait Implementations
impl<'de> Deserialize<'de> for Turn
[src]
impl<'de> Deserialize<'de> for Turn
[src]fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl StructuralPartialEq for Turn
[src]
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
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
pub fn vzip(self) -> V
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,