Enum map_model::PathConstraints
source · pub enum PathConstraints {
Pedestrian,
Car,
Bike,
Bus,
Train,
}
Expand description
Who’s asking for a path?
Variants§
Implementations§
source§impl PathConstraints
impl PathConstraints
pub fn all() -> Vec<PathConstraints>
sourcepub fn from_lt(lt: LaneType) -> PathConstraints
pub fn from_lt(lt: LaneType) -> PathConstraints
Not bijective, but this is the best guess of user intent
sourcepub fn can_use(self, lane: &Lane, map: &Map) -> bool
pub fn can_use(self, lane: &Lane, map: &Map) -> bool
Can an agent use a lane? There are some subtle exceptions with using bus-only lanes for turns.
sourcepub fn can_use_road(self, road: &Road, map: &Map) -> bool
pub fn can_use_road(self, road: &Road, map: &Map) -> bool
Can an agent use a road in either direction? There are some subtle exceptions with using bus-only lanes for turns.
Trait Implementations§
source§impl<O: Into<EnumSet<PathConstraints>>> BitAnd<O> for PathConstraints
impl<O: Into<EnumSet<PathConstraints>>> BitAnd<O> for PathConstraints
source§impl<O: Into<EnumSet<PathConstraints>>> BitOr<O> for PathConstraints
impl<O: Into<EnumSet<PathConstraints>>> BitOr<O> for PathConstraints
source§impl<O: Into<EnumSet<PathConstraints>>> BitXor<O> for PathConstraints
impl<O: Into<EnumSet<PathConstraints>>> BitXor<O> for PathConstraints
source§impl Clone for PathConstraints
impl Clone for PathConstraints
source§impl Debug for PathConstraints
impl Debug for PathConstraints
source§impl<'de> Deserialize<'de> for PathConstraints
impl<'de> Deserialize<'de> for PathConstraints
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 EnumSetTypePrivate for PathConstraints
impl EnumSetTypePrivate for PathConstraints
source§const ALL_BITS: Self::Repr = {transmute(0x1f): <pathfind::PathConstraints as enumset::__internal::EnumSetTypePrivate>::Repr}
const ALL_BITS: Self::Repr = {transmute(0x1f): <pathfind::PathConstraints as enumset::__internal::EnumSetTypePrivate>::Repr}
A mask of bits that are valid in the bitset.
source§const VARIANT_COUNT: u32 = 5u32
const VARIANT_COUNT: u32 = 5u32
The number of variants in the bitset.
source§fn enum_into_u32(self) -> u32
fn enum_into_u32(self) -> u32
Converts an enum of this type into its bit position.
source§unsafe fn enum_from_u32(val: u32) -> Self
unsafe fn enum_from_u32(val: u32) -> Self
Converts a bit position into an enum value.
source§fn serialize<S: Serializer>(
set: EnumSet<PathConstraints>,
ser: S
) -> Result<S::Ok, S::Error>
fn serialize<S: Serializer>( set: EnumSet<PathConstraints>, ser: S ) -> Result<S::Ok, S::Error>
Serializes the
EnumSet
. Read moresource§fn deserialize<'de, D: Deserializer<'de>>(
de: D
) -> Result<EnumSet<PathConstraints>, D::Error>
fn deserialize<'de, D: Deserializer<'de>>( de: D ) -> Result<EnumSet<PathConstraints>, D::Error>
Deserializes the
EnumSet
.source§impl Not for PathConstraints
impl Not for PathConstraints
source§impl Ord for PathConstraints
impl Ord for PathConstraints
source§fn cmp(&self, other: &PathConstraints) -> Ordering
fn cmp(&self, other: &PathConstraints) -> 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<EnumSet<PathConstraints>> for PathConstraints
impl PartialEq<EnumSet<PathConstraints>> for PathConstraints
source§fn eq(&self, other: &EnumSet<PathConstraints>) -> bool
fn eq(&self, other: &EnumSet<PathConstraints>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq for PathConstraints
impl PartialEq for PathConstraints
source§impl PartialOrd for PathConstraints
impl PartialOrd for PathConstraints
source§fn partial_cmp(&self, other: &PathConstraints) -> Option<Ordering>
fn partial_cmp(&self, other: &PathConstraints) -> 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 PathConstraints
impl Serialize for PathConstraints
source§impl<O: Into<EnumSet<PathConstraints>>> Sub<O> for PathConstraints
impl<O: Into<EnumSet<PathConstraints>>> Sub<O> for PathConstraints
impl Copy for PathConstraints
impl EnumSetType for PathConstraints
impl Eq for PathConstraints
Auto Trait Implementations§
impl Freeze for PathConstraints
impl RefUnwindSafe for PathConstraints
impl Send for PathConstraints
impl Sync for PathConstraints
impl Unpin for PathConstraints
impl UnwindSafe for PathConstraints
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.