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: LaneIDlane_type: LaneTypelane_center_pts: PolyLinewidth: Distancedir: Directionsrc_i: IntersectionIDdst_i: IntersectionIDtransit_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

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.