Enum map_model::pathfind::PathConstraints
source · [−]pub enum PathConstraints {
Pedestrian,
Car,
Bike,
Bus,
Train,
}
Expand description
Who’s asking for a path?
Variants
Pedestrian
Car
Bike
Bus
Train
Implementations
sourceimpl PathConstraints
impl PathConstraints
pub fn all() -> Vec<PathConstraints>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
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
sourceimpl<O: Into<EnumSet<PathConstraints>>> BitAnd<O> for PathConstraints
impl<O: Into<EnumSet<PathConstraints>>> BitAnd<O> for PathConstraints
sourceimpl<O: Into<EnumSet<PathConstraints>>> BitOr<O> for PathConstraints
impl<O: Into<EnumSet<PathConstraints>>> BitOr<O> for PathConstraints
sourceimpl<O: Into<EnumSet<PathConstraints>>> BitXor<O> for PathConstraints
impl<O: Into<EnumSet<PathConstraints>>> BitXor<O> for PathConstraints
sourceimpl Clone for PathConstraints
impl Clone for PathConstraints
sourceimpl Debug for PathConstraints
impl Debug for PathConstraints
sourceimpl<'de> Deserialize<'de> for PathConstraints
impl<'de> Deserialize<'de> for PathConstraints
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
sourceimpl EnumSetTypePrivate for PathConstraints
impl EnumSetTypePrivate for PathConstraints
sourceconst ALL_BITS: Self::Repr = {transmute(0x1f): ::Repr}
const ALL_BITS: Self::Repr = {transmute(0x1f): ::Repr}
A mask of bits that are valid in the bitset.
sourcefn enum_into_u32(self) -> u32
fn enum_into_u32(self) -> u32
Converts an enum of this type into its bit position.
sourceunsafe fn enum_from_u32(val: u32) -> Self
unsafe fn enum_from_u32(val: u32) -> Self
Converts a bit position into an enum value.
sourcefn 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 more
sourcefn 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
.
sourceimpl Not for PathConstraints
impl Not for PathConstraints
sourceimpl Ord for PathConstraints
impl Ord for PathConstraints
sourceimpl PartialEq<EnumSet<PathConstraints>> for PathConstraints
impl PartialEq<EnumSet<PathConstraints>> for PathConstraints
sourceimpl PartialEq<PathConstraints> for PathConstraints
impl PartialEq<PathConstraints> for PathConstraints
sourceimpl PartialOrd<PathConstraints> for PathConstraints
impl PartialOrd<PathConstraints> for PathConstraints
sourcefn partial_cmp(&self, other: &PathConstraints) -> Option<Ordering>
fn partial_cmp(&self, other: &PathConstraints) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn 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 more
sourceimpl Serialize for PathConstraints
impl Serialize for PathConstraints
sourceimpl<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 RefUnwindSafe for PathConstraints
impl Send for PathConstraints
impl Sync for PathConstraints
impl Unpin for PathConstraints
impl UnwindSafe for PathConstraints
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<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.
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)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more