Struct map_model::DirectedRoadID
source · pub struct DirectedRoadID {
pub road: RoadID,
pub dir: Direction,
}
Fields§
§road: RoadID
§dir: Direction
Implementations§
source§impl DirectedRoadID
impl DirectedRoadID
pub fn src_i(self, map: &Map) -> IntersectionID
pub fn dst_i(self, map: &Map) -> IntersectionID
sourcepub fn lanes(self, constraints: PathConstraints, map: &Map) -> Vec<LaneID>
pub fn lanes(self, constraints: PathConstraints, map: &Map) -> Vec<LaneID>
Strict for bikes. If there are bike lanes, not allowed to use other lanes.
sourcepub fn must_get_sidewalk(self, map: &Map) -> LaneID
pub fn must_get_sidewalk(self, map: &Map) -> LaneID
Get the only sidewalk or shoulder on this side of the road, and panic otherwise.
Trait Implementations§
source§impl Clone for DirectedRoadID
impl Clone for DirectedRoadID
source§fn clone(&self) -> DirectedRoadID
fn clone(&self) -> DirectedRoadID
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 DirectedRoadID
impl Debug for DirectedRoadID
source§impl<'de> Deserialize<'de> for DirectedRoadID
impl<'de> Deserialize<'de> for DirectedRoadID
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 Display for DirectedRoadID
impl Display for DirectedRoadID
source§impl Hash for DirectedRoadID
impl Hash for DirectedRoadID
source§impl Ord for DirectedRoadID
impl Ord for DirectedRoadID
source§fn cmp(&self, other: &DirectedRoadID) -> Ordering
fn cmp(&self, other: &DirectedRoadID) -> 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 DirectedRoadID
impl PartialEq for DirectedRoadID
source§fn eq(&self, other: &DirectedRoadID) -> bool
fn eq(&self, other: &DirectedRoadID) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for DirectedRoadID
impl PartialOrd for DirectedRoadID
source§fn partial_cmp(&self, other: &DirectedRoadID) -> Option<Ordering>
fn partial_cmp(&self, other: &DirectedRoadID) -> 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 DirectedRoadID
impl Serialize for DirectedRoadID
impl Copy for DirectedRoadID
impl Eq for DirectedRoadID
impl StructuralPartialEq for DirectedRoadID
Auto Trait Implementations§
impl Freeze for DirectedRoadID
impl RefUnwindSafe for DirectedRoadID
impl Send for DirectedRoadID
impl Sync for DirectedRoadID
impl Unpin for DirectedRoadID
impl UnwindSafe for DirectedRoadID
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.