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 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: IntersectionIDdriving_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 does the reasonable thing for the leftmost and rightmost lane on a road – except for roads with exactly one lane. For lanes in the middle of a road, it uses the direction of the lane – so bidirectional/contraflow cycletracks will 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.

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

Returns the argument unchanged.

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

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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)

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.