Struct map_model::objects::movement::MovementID
source · pub struct MovementID {
pub from: DirectedRoadID,
pub to: DirectedRoadID,
pub parent: IntersectionID,
pub crosswalk: bool,
}
Expand description
A movement is like a turn, but with less detail – it identifies a movement from one directed road to another. One road usually has 4 crosswalks, each a singleton Movement. We need all of the information here to keep each crosswalk separate.
We don’t create movements for SharedSidewalkCorners.
Fields§
§from: DirectedRoadID
§to: DirectedRoadID
§parent: IntersectionID
§crosswalk: bool
Could be a Crosswalk or UnmarkedCrossing
Implementations§
source§impl MovementID
impl MovementID
pub fn to_permanent(&self, map: &Map) -> Turn
pub fn from_permanent(id: Turn, map: &Map) -> Result<MovementID>
Trait Implementations§
source§impl Clone for MovementID
impl Clone for MovementID
source§fn clone(&self) -> MovementID
fn clone(&self) -> MovementID
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for MovementID
impl Debug for MovementID
source§impl<'de> Deserialize<'de> for MovementID
impl<'de> Deserialize<'de> for MovementID
source§fn 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
source§impl Hash for MovementID
impl Hash for MovementID
source§impl Ord for MovementID
impl Ord for MovementID
source§fn cmp(&self, other: &MovementID) -> Ordering
fn cmp(&self, other: &MovementID) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for MovementID
impl PartialEq for MovementID
source§fn eq(&self, other: &MovementID) -> bool
fn eq(&self, other: &MovementID) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for MovementID
impl PartialOrd for MovementID
source§fn partial_cmp(&self, other: &MovementID) -> Option<Ordering>
fn partial_cmp(&self, other: &MovementID) -> Option<Ordering>
1.0.0 · source§fn 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 moresource§impl Serialize for MovementID
impl Serialize for MovementID
impl Copy for MovementID
impl Eq for MovementID
impl StructuralPartialEq for MovementID
Auto Trait Implementations§
impl Freeze for MovementID
impl RefUnwindSafe for MovementID
impl Send for MovementID
impl Sync for MovementID
impl Unpin for MovementID
impl UnwindSafe for MovementID
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.