Struct map_model::Position [−][src]
Represents a specific point some distance along a lane.
Fields
lane: LaneID
dist_along: Distance
Implementations
impl Position
[src]
pub fn new(lane: LaneID, dist_along: Distance) -> Position
[src]
pub fn start(lane: LaneID) -> Position
[src]
pub fn end(lane: LaneID, map: &Map) -> Position
[src]
pub fn lane(&self) -> LaneID
[src]
pub fn dist_along(&self) -> Distance
[src]
pub fn pt(&self, map: &Map) -> Pt2D
[src]
pub fn pt_and_angle(&self, map: &Map) -> (Pt2D, Angle)
[src]
pub fn equiv_pos(&self, lane: LaneID, map: &Map) -> Position
[src]
Given a position along a lane, find the equivalent position along another lane on the same road.
pub fn equiv_pos_for_long_object(
&self,
other_lane: LaneID,
object_length: Distance,
map: &Map
) -> Position
[src]
&self,
other_lane: LaneID,
object_length: Distance,
map: &Map
) -> Position
pub fn min_dist(self, dist_along: Distance, map: &Map) -> Option<Position>
[src]
pub fn buffer_dist(self, buffer: Distance, map: &Map) -> Option<Position>
[src]
Trait Implementations
impl Clone for Position
[src]
impl Copy for Position
[src]
impl Debug for Position
[src]
impl<'de> Deserialize<'de> for Position
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Display for Position
[src]
impl Eq for Position
[src]
impl Ord for Position
[src]
fn cmp(&self, other: &Position) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<Position> for Position
[src]
impl PartialOrd<Position> for Position
[src]
fn partial_cmp(&self, other: &Position) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl Serialize for Position
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralEq for Position
[src]
impl StructuralPartialEq for Position
[src]
Auto Trait Implementations
impl RefUnwindSafe for Position
impl Send for Position
impl Sync for Position
impl Unpin for Position
impl UnwindSafe for Position
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
pub fn equivalent(&self, key: &K) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,