pub struct Movement {
pub id: MovementID,
pub turn_type: TurnType,
pub members: Vec<TurnID>,
pub geom: PolyLine,
pub angle: Angle,
}
Expand description
A Movement groups all turns from one road to another, letting traffic signals and pathfinding operate at a higher level of abstraction.
Fields
id: MovementID
turn_type: TurnType
members: Vec<TurnID>
geom: PolyLine
The “overall” path of movement, aka, an “average” of the turn geometry
angle: Angle
Implementations
sourceimpl Movement
impl Movement
pub(crate) fn for_i(
i: IntersectionID,
map: &Map
) -> BTreeMap<MovementID, Movement>
sourcepub fn src_center_and_width(&self, map: &Map) -> (PolyLine, Distance)
pub fn src_center_and_width(&self, map: &Map) -> (PolyLine, Distance)
Polyline points FROM intersection
pub fn conflicts_with(&self, other: &Movement) -> bool
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Movement
impl<'de> Deserialize<'de> for Movement
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
impl StructuralPartialEq for Movement
Auto Trait Implementations
impl RefUnwindSafe for Movement
impl Send for Movement
impl Sync for Movement
impl Unpin for Movement
impl UnwindSafe for Movement
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more