Struct map_model::objects::lane::Lane [−][src]
pub struct Lane {
pub id: LaneID,
pub lane_type: LaneType,
pub lane_center_pts: PolyLine,
pub width: Distance,
pub dir: Direction,
pub src_i: IntersectionID,
pub dst_i: IntersectionID,
pub transit_stops: BTreeSet<TransitStopID>,
pub driving_blackhole: bool,
pub biking_blackhole: bool,
}
Expand description
A road segment is broken down into individual lanes, which have a LaneType.
Fields
id: LaneID
lane_type: LaneType
lane_center_pts: PolyLine
width: Distance
dir: Direction
src_i: IntersectionID
dst_i: IntersectionID
transit_stops: BTreeSet<TransitStopID>
Meaningless order
driving_blackhole: bool
{Cars, bikes} trying to start or end here might not be able to reach most lanes in the graph, because this is near a border.
biking_blackhole: bool
Implementations
pt2 will be endpoint
This is just based on typical driving sides. Bidirectional or contraflow cycletracks as input may produce weird results.
Returns the set of allowed turn types, based on individual turn lane restrictions. None
means all turn types are allowed.
This will return None
for bus lanes, unless force_bus
is true. OSM turn restrictions on
bus lanes usually apply to regular vehicles, not the buses. When generating the turns for
buses, we probably don’t want to use the restrictions.
If the lanes share one endpoint, returns it. If they share two – because they belong to
the same road or there are two different roads connecting the same pair of intersections –
then return None
. If they share no common endpoint, panic.
(This is a weird API, really should be an enum with 3 cases)
Trait Implementations
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
Auto Trait Implementations
impl RefUnwindSafe for Lane
impl UnwindSafe for Lane
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
type Output = T
type Output = T
Should always be Self