pub struct TrafficLightBook<'a> { /* private fields */ }Expand description
Interface for accessing the TrafficLight in the super::RoadNetwork
Implementations§
Source§impl<'a> TrafficLightBook<'a>
impl<'a> TrafficLightBook<'a>
Sourcepub fn traffic_lights(&self) -> Vec<TrafficLight<'_>>
pub fn traffic_lights(&self) -> Vec<TrafficLight<'_>>
Sourcepub fn get_traffic_light(&self, id: &String) -> Option<TrafficLight<'_>>
pub fn get_traffic_light(&self, id: &String) -> Option<TrafficLight<'_>>
Gets a TrafficLight by its id.
§Arguments
id- The id of the TrafficLight.
§Returns
The TrafficLight with the given id. If no TrafficLight is found with the given id, return None.