[][src]Struct map_model::Road

pub struct Road {
    pub id: RoadID,
    pub osm_tags: Tags,
    pub turn_restrictions: Vec<(RestrictionType, RoadID)>,
    pub complicated_turn_restrictions: Vec<(RoadID, RoadID)>,
    pub orig_id: OriginalRoad,
    pub speed_limit: Speed,
    pub access_restrictions: AccessRestrictions,
    pub zorder: isize,
    pub children_forwards: Vec<(LaneID, LaneType)>,
    pub children_backwards: Vec<(LaneID, LaneType)>,
    pub center_pts: PolyLine,
    pub src_i: IntersectionID,
    pub dst_i: IntersectionID,
}

Fields

id: RoadIDosm_tags: Tagsturn_restrictions: Vec<(RestrictionType, RoadID)>complicated_turn_restrictions: Vec<(RoadID, RoadID)>orig_id: OriginalRoadspeed_limit: Speedaccess_restrictions: AccessRestrictionszorder: isizechildren_forwards: Vec<(LaneID, LaneType)>children_backwards: Vec<(LaneID, LaneType)>center_pts: PolyLinesrc_i: IntersectionIDdst_i: IntersectionID

Implementations

impl Road[src]

pub fn children(&self, fwds: bool) -> &Vec<(LaneID, LaneType)>[src]

pub(crate) fn children_mut(
    &mut self,
    fwds: bool
) -> &mut Vec<(LaneID, LaneType)>
[src]

pub fn get_lane_types<'a>(
    &'a self
) -> (impl Iterator<Item = LaneType> + 'a, impl Iterator<Item = LaneType> + 'a)
[src]

pub fn is_forwards(&self, lane: LaneID) -> bool[src]

pub fn is_backwards(&self, lane: LaneID) -> bool[src]

pub fn dir_and_offset(&self, lane: LaneID) -> (bool, usize)[src]

pub fn parking_to_driving(&self, parking: LaneID, map: &Map) -> Option<LaneID>[src]

pub(crate) fn speed_limit_from_osm(&self) -> Speed[src]

pub fn incoming_lanes(&self, i: IntersectionID) -> &Vec<(LaneID, LaneType)>[src]

pub fn outgoing_lanes(&self, i: IntersectionID) -> &Vec<(LaneID, LaneType)>[src]

pub fn offset_from_left(&self, lane: LaneID) -> usize[src]

pub fn find_closest_lane<F: Fn(&Lane) -> bool>(
    &self,
    from: LaneID,
    filter: F,
    map: &Map
) -> Option<LaneID>
[src]

pub fn all_lanes(&self) -> Vec<LaneID>[src]

pub fn lanes_on_side<'a>(
    &'a self,
    dir: bool
) -> impl Iterator<Item = LaneID> + 'a
[src]

pub fn get_current_center(&self, map: &Map) -> PolyLine[src]

pub fn any_on_other_side(&self, l: LaneID, lt: LaneType) -> Option<LaneID>[src]

pub fn get_half_width(&self, map: &Map) -> Distance[src]

pub fn get_thick_polygon(&self, map: &Map) -> Polygon[src]

pub fn get_name(&self, lang: Option<&String>) -> String[src]

pub fn get_rank(&self) -> RoadRank[src]

pub fn all_bus_stops(&self, map: &Map) -> Vec<BusStopID>[src]

pub fn percent_grade(&self, map: &Map) -> f64[src]

pub fn is_light_rail(&self) -> bool[src]

pub fn is_footway(&self) -> bool[src]

pub fn common_endpt(&self, other: &Road) -> IntersectionID[src]

pub fn is_private(&self) -> bool[src]

pub(crate) fn access_restrictions_from_osm(&self) -> AccessRestrictions[src]

pub fn get_zone<'a>(&self, map: &'a Map) -> Option<&'a Zone>[src]

Trait Implementations

impl Debug for Road[src]

impl<'de> Deserialize<'de> for Road[src]

impl Serialize for Road[src]

Auto Trait Implementations

impl RefUnwindSafe for Road

impl Send for Road

impl Sync for Road

impl Unpin for Road

impl UnwindSafe for Road

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,