Enum synthpop::TripEndpoint
source · pub enum TripEndpoint {
Building(BuildingID),
Border(IntersectionID),
SuddenlyAppear(Position),
}
Expand description
Specifies where a trip begins or ends.
Variants§
Building(BuildingID)
Border(IntersectionID)
SuddenlyAppear(Position)
Used for interactive spawning, tests, etc. For now, only valid as a trip’s start.
Implementations§
source§impl TripEndpoint
impl TripEndpoint
sourcepub fn path_req(
from: TripEndpoint,
to: TripEndpoint,
mode: TripMode,
map: &Map
) -> Option<PathRequest>
pub fn path_req( from: TripEndpoint, to: TripEndpoint, mode: TripMode, map: &Map ) -> Option<PathRequest>
Figure out a single PathRequest that goes between two TripEndpoints. Assume a single mode the entire time – no walking to a car before driving, for instance. The result probably won’t be exactly what would happen on a real trip between the endpoints because of this assumption.
fn pos(self, mode: TripMode, from: bool, map: &Map) -> Option<Position>
fn sidewalk_pos(self, map: &Map, from: bool) -> Option<Position>
pub fn start_walking_at_border(i: IntersectionID, map: &Map) -> Option<Position>
pub fn end_walking_at_border(i: IntersectionID, map: &Map) -> Option<Position>
Trait Implementations§
source§impl Clone for TripEndpoint
impl Clone for TripEndpoint
source§fn clone(&self) -> TripEndpoint
fn clone(&self) -> TripEndpoint
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 TripEndpoint
impl Debug for TripEndpoint
source§impl<'de> Deserialize<'de> for TripEndpoint
impl<'de> Deserialize<'de> for TripEndpoint
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 Ord for TripEndpoint
impl Ord for TripEndpoint
source§fn cmp(&self, other: &TripEndpoint) -> Ordering
fn cmp(&self, other: &TripEndpoint) -> 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 TripEndpoint
impl PartialEq for TripEndpoint
source§fn eq(&self, other: &TripEndpoint) -> bool
fn eq(&self, other: &TripEndpoint) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for TripEndpoint
impl PartialOrd for TripEndpoint
source§fn partial_cmp(&self, other: &TripEndpoint) -> Option<Ordering>
fn partial_cmp(&self, other: &TripEndpoint) -> 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 TripEndpoint
impl Serialize for TripEndpoint
impl Copy for TripEndpoint
impl Eq for TripEndpoint
impl StructuralPartialEq for TripEndpoint
Auto Trait Implementations§
impl Freeze for TripEndpoint
impl RefUnwindSafe for TripEndpoint
impl Send for TripEndpoint
impl Sync for TripEndpoint
impl Unpin for TripEndpoint
impl UnwindSafe for TripEndpoint
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.