pub struct RoadNetwork { /* private fields */ }
Expand description
A RoadNetwork.
Wrapper around C++ implementation maliput::api::RoadNetwork
.
§Example
use maliput::api::RoadNetwork;
use std::collections::HashMap;
let package_location = std::env::var("CARGO_MANIFEST_DIR").unwrap();
let xodr_path = format!("{}/data/xodr/TShapeRoad.xodr", package_location);
let road_network_properties = HashMap::from([("road_geometry_id", "my_rg_from_rust"), ("opendrive_file", xodr_path.as_str())]);
let road_network = RoadNetwork::new("maliput_malidrive", &road_network_properties);
let road_geometry = road_network.road_geometry();
println!("num_junctions: {}", road_geometry.num_junctions());
Implementations§
Source§impl RoadNetwork
impl RoadNetwork
Sourcepub fn road_geometry(&self) -> RoadGeometry<'_>
pub fn road_geometry(&self) -> RoadGeometry<'_>
Get the RoadGeometry
of the RoadNetwork
.
Sourcepub fn intersection_book(&mut self) -> IntersectionBook<'_>
pub fn intersection_book(&mut self) -> IntersectionBook<'_>
Get the IntersectionBook
of the RoadNetwork
.
Sourcepub fn traffic_light_book(&self) -> TrafficLightBook<'_>
pub fn traffic_light_book(&self) -> TrafficLightBook<'_>
Get the TrafficLightBook
of the RoadNetwork
.
Sourcepub fn rulebook(&self) -> RoadRulebook<'_>
pub fn rulebook(&self) -> RoadRulebook<'_>
Get the RoadRulebook
of the RoadNetwork
.
Auto Trait Implementations§
impl Freeze for RoadNetwork
impl RefUnwindSafe for RoadNetwork
impl !Send for RoadNetwork
impl !Sync for RoadNetwork
impl Unpin for RoadNetwork
impl UnwindSafe for RoadNetwork
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more