pub enum LanePosition {
FromStart(Length),
FromEnd(Length),
}Expand description
A position along a lane.
SUMO encodes the two cases in the sign of one number: a negative pos
means “measured back from the lane’s end”. That is spelled out as two
variants rather than left as a signed Length because the difference
is not cosmetic — reading a -12.5 as a distance from the start puts a
detector at the wrong end of the road, and nothing about the number
itself says so.
Neither variant is resolved to the other here: doing that needs the
lane’s length, which lives in the .net.xml this format deliberately
doesn’t require to be loaded alongside.
Variants§
FromStart(Length)
Distance from the lane’s start, SUMO’s non-negative pos.
FromEnd(Length)
Distance back from the lane’s end, i.e. SUMO’s negative pos with
the sign already taken off: pos="-12.5" is FromEnd(12.5 m).
Trait Implementations§
Source§impl Clone for LanePosition
impl Clone for LanePosition
Source§fn clone(&self) -> LanePosition
fn clone(&self) -> LanePosition
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for LanePosition
Source§impl Debug for LanePosition
impl Debug for LanePosition
Source§impl PartialEq for LanePosition
impl PartialEq for LanePosition
impl StructuralPartialEq for LanePosition
Auto Trait Implementations§
impl Freeze for LanePosition
impl RefUnwindSafe for LanePosition
impl Send for LanePosition
impl Sync for LanePosition
impl Unpin for LanePosition
impl UnsafeUnpin for LanePosition
impl UnwindSafe for LanePosition
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