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 bus_stops: BTreeSet<BusStopID>,
    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: LaneIDlane_type: LaneTypelane_center_pts: PolyLinewidth: Distancedir: Directionsrc_i: IntersectionIDdst_i: IntersectionIDbus_stops: BTreeSet<BusStopID>

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

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.

Starting from this lane, follow the lane’s left edge to the intersection, continuing to “walk around the block” until we reach the starting point. This only makes sense for the outermost lanes on a road. Returns the polygon and all visited lanes.

TODO This process currently fails for some starting positions; orienting is weird.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.